The importance of metalness and why we’ve added the Metalness parameter to the V-Ray standard material to better support a PBR workflow in V-Ray Next.
Let’s set the record straight
The term “Physically Based Rendering” — or PBR — does, in itself, imply that the material definition used in PBR is based on real physics. Some have also interpreted this as meaning that other shading models are not based on real physics; which is wrong.
While real-time rendering shading models were not necessarily based on real physics, other ray tracers, such as V-Ray, have always been physically based. As such, PBR shading models became very popular for real-time rendering for two basic reasons:
- It is actually physically based.
- It requires fewer variables — and therefore texture maps — to define a material.
Since memory resources are at a premium in the game industry, the PBR model has inevitably become very popular and very resourceful.
The main difference that the PBR shading model has over other physically based shading models, such as the one used by V-Ray, is how it describes reflections. Most people know this as the addition of a variable called “metalness”. If you look in most physics books, you will not see any description of a material by its “metalness. ” So, let’s examine a bit closer what this term means.
About metalness
There is, in fact, a distinction between two different types of materials: dielectric and conductive. Dielectric materials are insulators and conductive materials conduct electricity. Examples of dielectric materials include glass, plastic, wood, ceramic, leather and so on. Examples of conductive materials include steel, copper, gold — in other words: metals.
Dielectric
Conductive
In physics, conductive materials have a different reflective property, which is why most people see them as very reflective with no diffuse property. If your renderer is based on dielectric properties then metals are generally interpreted by removing the diffuse and giving the shader a high fresnel value — generally much higher than what you would see in a physics book (more on that later).
When conductive materials are added as an option in the shaders this can make it easier for people to represent metals. What can be confusing is that a material is either dielectric or conductive; there is no in-between state. The term metalness, and the fact that it is a variable of 0 to 1 instead of state of 0 or 1, implies that there are different levels of metalness. In the real world, there aren’t. Many users of PBR believe that controlling the reflectivity of an object should all be done through metalness values between 0 and 1, and that the Index of Refraction (IOR) value is a constant for all materials; this is physically inaccurate. Different materials have different IOR values and materials are either dielectric or conductive.
PBR, video games and Substance Designer
PBR has become very popular in the world of real-time rendering with tools like Unity and Unreal, and therefore the video game industry. Another tool embraced by this industry is Allegorithmic’s Substance Designer. Substance allows artists to paint maps that fit PBR shading and include a metalness map.
However, Substance is not just popular for game designers. It is also being used in arch viz, VFX and other industries that do CG rendering with tools like V-Ray. Therefore, many of those users want to use those maps with V-Ray. So, in V-Ray Next, we decided to include the Metalness parameter in our V-Ray standard material to better support a PBR workflow.
Your PBR workflow
Now that we have established that you should consider metalness more as an on or off state, let's look at how to make the material work. When making a dielectric material, diffuse color controls the Lambertian part of the shading and the reflection is controlled by several variables: Reflection color as a multiplier of the overall reflection; IOR for the proportion of reflectivity on the forward-facing normals, versus the glancing normals (also known as the Fresnel); and Glossiness (or its inverse roughness) for the overall amount of scattering, depending on the BRDF model you select.
When switching to a metal material, which is done by making the Metalness value 1, the variables take on different meanings:
- Since there is no diffuse color in metals, the diffuse color becomes what is known as the base color — or albedo color.
- The Reflection should be set to white so as to get the proper reflectivity and preservation of energy; without this, the glancing angle will never be 100% reflective — which it should be.
- How much that reflection is blended in is still controlled by the same IOR value of the Fresnel effect; you'll notice this now has a very subtle effect as the entire material is basically reflective — it’s as if you are blending two different reflections together.
- Glossiness controls how shiny it is; however, if you use a roughness map instead (such as what Substance does), you can switch your V-Ray material to use roughness — which is the inverse of glossiness.
Here are some examples
Now that we have a general idea of how metalness works, let’s take a look at a few examples and their settings:
Diffuse 255,255,255; Reflection 255,255,255; Glossiness 1; IOR 1.5
Diffuse 0,0,0; Reflection 255,255,255; Glossiness 1; IOR 1.5.
Diffuse 0,0,0; Reflection 255,255,255; Glossiness 1; IOR 2
Diffuse 243,201,104 (gold); Reflection 255,255,255; Glossiness 1; IOR 1.35.
Diffuse 46,46,46 (18% gray); Reflection 255,255,255; Glossiness 0.6; IOR 1.5.
The Index of Refraction
As we mentioned before, the IOR still plays an important role when creating a physically based material. Therefore, we still need to consider this as part of the shader. In fact, the site RefractiveIndex.info is a great resource for understanding the proper IOR of different materials. However, inputting those numbers into a V-Ray shader will not match exactly. As such, Vlado has created this chart to help make the translation easier:
Name |
|
Base (diffuse) color |
|
Reflection color |
|
IOR |
Metalness |
Base color (web) |
Base color (sRGB) |
||||
|
Red |
Green |
Blue |
|
Red |
Green |
Blue |
||||||
Silver |
|
252 |
250 |
249 |
|
255 |
255 |
255 |
|
1.082 |
1 |
fefefd |
|
Gold |
|
243 |
201 |
104 |
|
255 |
255 |
255 |
|
1.35002 |
1 |
fbe6ab |
|
Copper |
|
238 |
158 |
137 |
|
255 |
255 |
255 |
|
1.21901 |
1 |
f8cfc2 |
|
Aluminium |
|
230 |
233 |
235 |
|
255 |
255 |
255 |
|
1.002 |
1 |
f5f6f6 |
|
Chromium |
|
141 |
141 |
141 |
|
255 |
255 |
255 |
|
1.03 |
1 |
c5c5c5 |
|
Lead |
|
167 |
168 |
176 |
|
255 |
255 |
255 |
|
1.016 |
1 |
d4d5d9 |
|
Platinum |
|
243 |
238 |
216 |
|
255 |
255 |
255 |
|
1.024 |
1 |
faf8ee |
|
Titanium |
|
246 |
239 |
208 |
|
255 |
255 |
255 |
|
1.086 |
1 |
fcf9ea |
|
Tungsten |
|
236 |
213 |
193 |
|
255 |
255 |
255 |
|
1.007 |
1 |
f7ece2 |
|
Iron |
|
226 |
223 |
210 |
|
255 |
255 |
255 |
|
1.006 |
1 |
f3f1eb |
|
Vanadium |
|
241 |
228 |
199 |
|
255 |
255 |
255 |
|
1.034 |
1 |
faf3e5 |
|
Zinc |
|
223 |
221 |
218 |
|
255 |
255 |
255 |
|
1.011 |
1 |
f1f0ef |
|
Nickel |
|
226 |
219 |
192 |
|
255 |
255 |
255 |
|
1.016 |
1 |
f3efe2 |
|
Mercury |
|
199 |
198 |
198 |
|
255 |
255 |
255 |
|
1.013 |
1 |
e5e5e5 |
|
Cobalt |
|
174 |
167 |
157 |
|
255 |
255 |
255 |
|
1.031 |
1 |
d8d4cf |
And here are some examples of metals based on the RefractiveIndex.info site:
Brushed aluminum
Polished aluminum
Tungsten
Copper
Metalness texture maps
As we mentioned before, many users will probably be more inclined to use the Metalness parameter because those are the maps that they have. So, the Metalness texture map is more of a mask between two different types of materials: dielectric or conductive.
The following example shows how we can get two different materials: one with metalness and set to 1; the other set to 0 using Substance Designer. You’ll see that we can essentially create two different materials using a single shader and fewer maps: base color, metalness, normal and roughness.
Substance Designer tree showing map output
Corroded copper. V-Ray render of shader with Substance Designer maps
Let’s recap
PBR materials are very popular and allow people to use textures in many different types of renderers, especially real-time rendering solutions. However, many users also want to continue to use those same textures with V-Ray. By adding the Metalness variable to the standard V-Ray material inside of V-Ray Next, users can continue their PBR workflow without having to use a completely new shader.
CG Garage Podcast #190 features Zap Andersson, an expert in shading at Autodesk, who talks with podcast host, Chris Nichols, about some of the myths around physically based and spectral rendering, metalness and real-time. To tune straight into the metalness discussion, scrub ahead to the 39-minute mark.