I
literature

Iray Uber Shader: One more time!

DOrdiales's avatar
By DOrdiales   |   Watch
55 16 3K (3 Today)
Published: January 11, 2019
Warning! This tutorial is not intended to cover each of the shader's properties. That's what the original product documentation is for. It only intends to facilitate, as far as possible, its understanding. Bear in mind, that it's also a personal way of seeing it. Thanks to my wife (and Google's translator), for helping me with my lousy English!

1. Definitions

  • Face / Polygon: area delimited by edges and vertices. A face is coplanar, when all its edges and vertices are on the same plane. We denominate normal to the vector that is perpendicular to a coplanar face.
  • Geometry / Object: set of faces that build a figure or volume (e.g. Genesis). Some objects can be formed by more than one geometry (e.g., Victoria 8 has a separate geometry for her eyelashes).
  • Surface: subset of faces of a geometry (e.g., arms, ears, face, legs, torso, etc.). The surfaces can also be grouped into different groups (e.g., nails, skin, etc.).
  • Shader / Material: set of properties (reflection, transmission, emission, absorption and dispersion), that the rendering engine will take into account when running the necessary computations to create the image.     

2. Iray Uber Shader

The light that falls on the surface of a geometry can be both reflected and transmitted. A surface can also emit light.

Recommended readingMDL Handbook

The Iray Uber Shader is composed of three layers: the base layer, the metallic flakes layer and the top coat layer. 

2.1. Base Layer

The Base layer constitutes the first layer of the shader.

2.1.1. Mixing

We will use the physical model Physically based rendering Metallicity / Roughness.

  • Base Mixing: PBR Metallicity / Roughness

2.1.2. Diffuse

The property Metallicity specifies whether the surface is dielectric or conductive. Dielectric surfaces (0.00) reflect light diffusely (e.g. paper). The conductive surfaces (1.00) reflect light specularly (e.g. mirror).

   01 Diffuse by DOrdiales 02 Specular by DOrdiales                 

  • Metallicity (metallicity map): 0.00 (default value)

The property Base Color specifies the color reflected by a surface. The light that is not reflected is absorbed.

  • Base Color (diffuse map): 0.54 0.54 0.54 (default value)
03 Red by DOrdiales 04 Green by DOrdiales 05 Blue by DOrdiales       

In addition to a color, we can use a diffuse map

46 Diffuse by DOrdiales 47 Diffuse Map by DOrdiales

The property Translucency Weight defines translucency: percentage of light transmitted diffusely through a dielectric surface. For example, a 0.40 value indicates that 40 percent of the light will be transmitted and 60 percent will be reflected.

Note: The property Thin Walled specifies whether a surface is hollow (On) or solid (Off). This property will affect the application of translucency.

06 Translucency by DOrdiales 07 Transl+Volume by DOrdiales    

  • Translucency Weight: 0.00 (default value)

The property Base Color Effect specifies whether the light absorbed by a surface is transmitted (Scatter & Transmit) or not (Scatter Only) by it. This property does not change the color of the transmitted light, only its intensity.

  • Base Color Effect: Scatter Only (default value)
08 Scatter  Transmit by DOrdiales 09 Scatter Only by DOrdiales    

The property Translucency Color specifies the color of the transmitted light.

  • Translucency Color (SSS map): 1.00 1.00 1.00 (default value).
Note: For solid surfaces it is better to assign the transmission color by the properties of section Volume.

Example

  • Base Color: 1.00 1.00 0.00
  • Translucency Weight: 0.50
  • Base Color Effect: Scatter & Transmit
  • Translucency Color: 1.00 0.00 0.00

The geometry: reflects the yellow color, in the areas where the light reaches its surface; transmits the color red; shows the orange color where red emerges next to yellow.

10 Translucency Color by DOrdiales 

Note: Physically, the diffuse reflection is due to the fact that part of the transmitted light is scattered by the internal structure of an object. What it brings, that part of the scattered light re-emerges its surface. If a material is very dense (Translucency Weight = 0.00), the transmission distance will be negligible. If it is less dense, we will have to configure its final appearance through the properties of section Volume.

Recommended readingIntroduction to Shading

2.1.3. Glossy

The dielectric surfaces do not reflect light only diffusely, but also specularly. This may be due to its internal composition (e.g. plastic) or the different layers that make it up (e.g. fruit).

11 Glossy by DOrdiales 

The property Glossy Layered Weight allows us to deactivate (0.00) or activate (1.00) the specular reflection of the dielectric surfaces, whose internal composition contains both diffuse and specular components.

  • Glossy Layered Weight (specular map): 1.00 (default value)

The property Glossy Color specifies the color of specular reflection. Except for some metals (like bronze, gold or copper), we must use the color white.

  • Glossy Color: 1.00 1.00 1.00 (default value)

The property Glossy Color Effect is similar to the property Base Color Effect.

  • Glossy Color Effect: Scatter Only (default value)

The property Glossy Reflectivity specifies the percentage of reflected specular light.

  • Glossy Reflectivity: 0.50 (default value)

The property Glossy Roughness specifies the percentage of roughness of the surface. Rough surfaces reflect light more in certain directions than in others. This gives them a blurred appearance or glossy.

  • Glossy Roughness (roughness map): 0.00 (default value)
    12 Glossy Roughness by DOrdiales 13 Glossy Roughness 2 by DOrdiales

The property Refraction Index specifies the speed of light in a medium different than vacuum (e.g., 0.00: air, 1.31: water, 1.44: skin, 1.52: crystal, 2.42: diamond, etc.). The speed of light through a medium changes its direction. That's why we observe phenomena like a pencil apparently split inside a glass of water.

14 Air by DOrdiales 15 Crystal by DOrdiales 16 Diamond by DOrdiales       

  • Refraction Index: 1.50 (default value)

The property Refraction Weight defines refraction: percentage of light transmitted specularly through a dielectric surface. For example, the 0.40 value indicates that 40 percent of the light will be transmitted and 60 percent will be reflected. A 1.00 value obtains a completely transparent surface!

Note: The property Thin Walled specifies whether a surface is hollow (On) or solid (Off). This property will affect the application of refraction.

17 Refraction by DOrdiales 18 Ref+Volume by DOrdiales    

  • Refraction Weight (refraction map): 0.00 (default value)
Why not, a refraction map?

48 Refraction by DOrdiales 49-Refraction-Map by DOrdiales

If we click on button Share Glossy Inputs, other properties will appear like Refraction Color, which allows us to specify the color of the transmitted light. 

53 Refraction by DOrdiales

Note: Physically, transparent surfaces do not transmit only light, but also mirror part specularly. To calculate the part of reflected light and the part of transmitted light, the Fresnel equations are used.

Recommended readingThe Phong Model, Introduction to the Concepts of Shader, Reflection Models and BRDF

2.1.4. Bump

Bump maps and Normal maps allow the simulation of complex surfaces, by modifying the normals of their surfaces.

The example shows a bump map created with a Photoshop filter. Notice, how each gray value is interpreted with a different relief.

19 Bump by DOrdiales 21 Map1 by DOrdiales 20 Bump by DOrdiales    

  • Base Bump (bump map): Choose Map
  • Normal Map (normal map): Choose Map

2.2. Metallic Flakes Coat

The layer Metallic Flakes constitutes the second layer of the shader.

The property Metallic Flakes Weight allows us to deactivate (0.00) or activate (1.00) the layer on the base layer.

22 Metallic Flakes by DOrdiales 

  • Metallic Flakes Weight (metallic map): 0.00 (default value)

The Property Metallic Flakes Size specifies the size of the fleaks.

  • Metallic Flakes Size: 0.0010 (default value)

2.3. Top Coat Coat

The layer Top Coat constitutes the third layer of the shader.

As we have seen previously, the dielectric surfaces do not reflect light only diffusely, but also specularly. And this may be due, to the different layers that make it up.

23 Top Coat by DOrdiales 

The property Top Coat Weight allows us to deactivate (0.00) or activate (1.00) the specular reflection of the dielectric surfaces, when said reflection is due to a transparent top layer (e.g., fruit, varnished wood, moist skin, etc.). Being a transparent layer, part of the light will be reflected and part of the light will be transmitted to the base layer. Where again, it will be reflected or transmitted.

  • Top Coat Weight (specular map): 0.00 (default value)
We ca use a specular map, and get like this that the transparent layer only applies to certain areas of the Top Coat layer.

50 Top Coat by DOrdiales 51-Top-Coat-Map by DOrdiales 

The property Top Coat Color specifies the color of specular reflection.

  • Top Coat Color: 1.00 1.00 1.00 (default value)

The property Top Coat Color Effect is similar to the property Glossy Color Effect.

  • Top Coat Color Effect: Scatter Only (default value)

The property Top Coat Roughness specifies the percentage of roughness of the surface.

  • Top Coat Roughness (rouhness map): 0.00 (default value)
24 Top Coat Roughness by DOrdiales 

The property Top Coat Layering Mode specifies the equation (Reflectivity, Weighted and Fresnel) used, when calculating the part of the light that is reflected on the surface and the part of the light that is transmitted to the base layer.

  • Top Coat Layering Mode: Reflectivity (default value)

The property Top Coat Bump allows us to use a bump map on the transparent layer. 

  • Top Coat Bump (map bump): Choose Map
25 Top Coat Bump by DOrdiales 26 Map by DOrdiales
 

2.4. Volume

The property Thin Walled specifies whether a surface is hollow (On) or solid (Off). This property will affect the application of translucency and refraction.

  • Thin Walled: On (default value)
07 Transl+Volume by DOrdiales 18 Ref+Volume by DOrdiales    

The translucent and transparent solid surfaces can both absorb and disperse part of the transmitted light.

Absorption coefficient

For a given distance, we call absorption coefficient, the percentage of light transmitted through a surface that will be absorbed each time the light travels that distance.

Example

If we assign the white color to property Translucency Color, the following example will absorb the next percentages of the transmitted white color, once the light has traveled one centimeter: 0.27% 0.81% 0.90%. 

  • Base Color: 0.54 0.54 0.54
  • Translucency Weight: 0.50
  • Base Color Effect: Scatter & Transmit
  • Translucency Color: 1.00 1.00 1.00

  • Transmitted Measurement Distance (cm): 1.00
  • Transmitted Color (%): 0.73 0.19 0.10 

Note: Bear in mind, that the property Transmitted Color shows the resulting color once the absorption has already taken place: (0.73 + 0.27) (0.19 + 0.81) (0.10 + 0.90)

If after traveling a centimeter, the geometry ends, we can see the color assigned to property Transmitted Color. If the geometry does not finish, the light will continue to absorb. In the case that the geometry is sufficiently thick, the light can be completely absorbed.

27 Mickey by DOrdiales 28 Mickey by DOrdiales   

Scattering coefficient

The internal structure of the translucent materials, brings with it that part of the transmitted light is dispersed. The light can be scattered towards the light emitting source (subsurface scattering) or in the opposite direction.

For a given distance, We call the dispersion coefficient, the percentage of light transmitted through a surface that will be dispersed after traveling that distance.

Example

In the following example, once the light has traveled 0.5 cm, 50 percent of the light will scatter towards the light emitting source and the other 50 percent will disperse in the opposite direction.

  • Scattering Measurement Distance (cm): 0.50
  • SSS Amount (%): 1.00
  • SSS Direction: 0.00 

As a consequence of this: the surface will lose part of its transparency (since part of the transmitted light is now scattered in the direction of the light-emitting source); and the surface will acquire a diffuse appearance (due to the part of the light that will reemerge next to the light already reflected).

Example

  • Base Color: 1.00 0.00 0.00
  • Translucency Weight: 0.50
  • Base Color Effect: Scatter Only
  • Translucency Color: 1.00 1.00 1.00
  • Transmitted Measurement Distance (cm): 0.10
  • Transmitted Color (%): 0.00 1.00 0.00 
  • Scattering Measurement Distance (cm): 0.10
  • SSS Amount (%): 0.50
  • SSS Direction: 0.00 

The geometry reflects red color. However, we see an orange color due to the transmitted green light that is scattered in the direction of the light source.

29 Scattering by DOrdiales 

Example

An example of fog. A transparent surface with refractive index one (air), plus a little scattering.

  • Refraction Index: 1.00
  • Refraction Weight1.00
  • Scattering Measurement Distance (cm): 0.25
  • SSS Amount (%): 0.50
52 Fog by DOrdiales

Note: in the latest version of the shader, it is possible to indicate the percentage that will be dispersed of each color. Bear in mind, that values close to one scatter less light than values close to zero. For example, the skin scatters more cyan (green plus blue) than red.
  • Base Color: 0.98 0.69 0.52
  • Translucency Weight: 0.50
  • Base Color Effect: Scatter Only
  • Translucency Color: 1.00 1.00 1.00
  • Transmitted Measurement Distance (cm): 0.12
  • Transmitted Color (%): 0.95 0.19 0.10 (less red than cyan)
  • SSS Mode: Chromatic
  • Scattering Measurement Distance (cm): 0.015
  • SSS Color: 0.96 0.41 0.10
  • SSS Direction: 0.00
30 Skin by DOrdiales

Recommended readingVolume Rendering for Artists

2.5. Emission

In addition to reflecting and transmitting light, surfaces can also emit light. We denominate mesh lights to the emitting surfaces of light.

31 Emission by DOrdiales 

The property Emission Color specifies the color emitted by a surface.

  • Emission Color: 1.00 1.00 1.00 (default value)
32 Emission Color by DOrdiales 

The property Emission Temperature specifies the temperature of the light, in Kelvin degrees. Low temperatures get warm scenes (e.g., candlelight: 1500K, incandescent: 2680K, halogen: 3000K, etc.). High temperatures get cold scenes (e.g., 4200K, daylight noon: 5500K, daylight: 6500K, blue sky: 8000K, etc.).

  • Emission Temperature (K): 6500.00 (default value)
33 Halogen by DOrdiales 31 Emission by DOrdiales 34 Sky by DOrdiales       

The property Two Sided Light specifies, If the surface emits light by one side (Off) or both sides (On).

  • Two Sided Light: Off (default value)
35 Two Sided Light 1 by DOrdiales 36 Two Sided Light 2 by DOrdiales    

The property Luminance specifies the luminous intensity of light travelling in a given direction. 

  • Luminance (luminance map): 1500.00 (default value)
       38 15 by DOrdiales 31 Emission by DOrdiales 39 60 by DOrdiales

The Property Luminance Units specifies the power unit of the light. The candela per square meter (cd/m^2) is the derived luminance unit of the International System of Units.

  • Luminance Units: cd/m^2 (default value)
Recommended readingIntroduction to Shading

2.6. Geometry

The property Cutout Opacity specifies the opacity level of a surface.

40 Cutout Opacity by DOrdiales 41 Map4 by DOrdiales 

  • Cutout Opacity (mask map): 0.00 (default value)

The displacement maps allow the creation of complex surfaces, by the actual modification of the surface to which they are applied.  

Example

The following example, applies a displacement map to a surface:

  • Displacement Strength (displacement map): 2.00
  • Minimum Displacement: -1.00
  • Maximum Displacement: 1.00
  • SubD Displacement Level: 5

42 Displacement by DOrdiales 43 Map5 by DOrdiales
Note: the New Geometry Shell command (which is in menu Create), allows the creation of a new geometry superimposed on the original. If we use a layer mask map in property Cutout Opacity, we can apply the shader both the original geometry and the superimposed.

44 Geometry Shell by DOrdiales 45 Map6 by DOrdiales

That's all folks!

In case someone is interested in understanding how physics thinks that photons really behave: 

© 2019 DOrdiales
Warning! This tutorial is not intended to cover each of the shader's properties. That's what the original product documentation is for. It only intends to facilitate, as far as possible, its understanding. Bear in mind, that it's also a personal way of seeing it. Thanks to my wife (and Google's translator), for helping me with my lousy English!
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
Comments (16)
LmAnt's avatar
LmAnt|Student Digital Artist
Excellent overview!
Thank you very much!
Reply  ·  
DOrdiales's avatar
You are welcome!
Reply  ·  
soup-sammich's avatar
soup-sammich|Hobbyist Digital Artist
Awesome!  Thank you!
Reply  ·  
DOrdiales's avatar
You are welcome!
Reply  ·  
jackaroo47's avatar
jackaroo47|Hobbyist Digital Artist
pretty cool!!
Reply  ·  
ODastein's avatar
Thanks a lot for this detailed (and illustrated) explanation.
Reply  ·  
Blurrito's avatar
Blurrito|Hobbyist Digital Artist
Great job!
Reply  ·  
DOrdiales's avatar
Thank you, very much!
Reply  ·  
vanteal's avatar
vanteal|Hobbyist Digital Artist
Amazing! And amazingly useful! Thank you so very much for this!
Reply  ·  
DOrdiales's avatar
Thanks, Vanteal!
Reply  ·  
Silvinx's avatar
Silvinx|Hobbyist Digital Artist
Thank you so much, very useful :clap:
Reply  ·  
DOrdiales's avatar
You are welcome!
Reply  ·  
TawnyT's avatar
TawnyT|Hobbyist Digital Artist
Thank you for this great overview :-)
Reply  ·  
DOrdiales's avatar
My pleasure.
Reply  ·  
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
©2019 DeviantArt
All Rights reserved