Go to: Attributes.

The dielectric_material shader is a physically based material shader which can be used to simulate dielectric media such as glass, water, and other liquids. The shader uses Fresnel's formulas for dielectric interfaces. This means that most light is transmitted through the surface for perpendicular incident directions while most light is reflected by the surface for grazing incident angles, simulating the behavior of real dielectric materials. The shader also uses Beer's law for absorption of light that passes through a medium. This means that the light is subject to an exponential falloff as it is transmitted between two surfaces with dielectric material.

Two types of dielectric interfaces are supported: dielectric-air simulates the interface between a dielectric material and air, such as glass-air, and dielectric-dielectric simulates the interface between two dielectric materials, such as glass-water.

Two achieve physically correct simulations it is important to use the correct surface interfaces. When modeling a glass of cognac three different interfaces are required: glass-air, glass-cognac, and cognac-air. The dielectric material uses the normals of the surface to distinguish the media on either side of the interface. For a dielectric-air interface the normals point into the air. For a dielectric-dielectric interface the normal point into a dielectric material which is "outside". To use the dielectric material the model normals must be oriented correctly unless the ignore_normals parameter is set to true. This shader cannot be used as a shadow shader.

The .mi declaration is:

    color "dielectric_material" (
        color           "col",
        scalar          "ior",
        color           "col_out",
        scalar          "ior_out",
        boolean         "ignore_normals"
        scalar          "phong_coef",
        array lights    "lights"

The components of the declaration are described below in the corresponding attributes.

Node nameParentsClassificationMFn typeCompatible function sets

Attributes (17)

col, colB, colG, colR, col_out, col_outB, col_outG, col_outR, ignore_normals, ior, ior_out, lights, outValue, outValueB, outValueG, outValueR, pcoef

Long name (short name)TypeDefaultFlags
col (S00) float30, 0, 0outputinputconnectablestorablekeyable
The persistence coefficient which corresponds to the fraction of light which is left after traversing one unit of material. Thus 0.9 means that 10% of the light is absorbed per unit length of the material. Lengths are measured in world coordinates.
colR (S00R) float0outputinputconnectablestorablekeyable
Color red component.
colG (S00G) float0outputinputconnectablestorablekeyable
Color green component.
colB (S00B) float0outputinputconnectablestorablekeyable
Color blue component.
ior (S01) float1.5outputinputconnectablestorablekeyable
Index of refraction of the dielectric material.
col_out (S02) float31, 1, 1outputinputconnectablestorablekeyable
if specified, the material is a dielectric-dielectric interface and col_out is the persistence coefficient of the outside dielectric material.
col_outR (S02R) float1outputinputconnectablestorablekeyable
Color Out red component.
col_outG (S02G) float1outputinputconnectablestorablekeyable
Color Out green component.
col_outB (S02B) float1outputinputconnectablestorablekeyable
Color Out blue component.
ior_out (S03) float1outputinputconnectablestorablekeyable
Used in combination with col_out to describe the outside dielectric material.
ignore_normals (S04) boolfalseoutputinputconnectablestorablekeyable
Normally the decision whether a ray enters or leaves the object is based on the direction of the normal (towards or away from the incident ray). If the object is poorly modeled and the normals cannot be trusted, this flag can be set to make the dielectric material shader count the number of times the ray has entered and left the object before instead of relying on the normal direction.
pcoef (S05) float0outputinputconnectablestorablekeyable
phong coefficient used to compute normalized phong highlights which again is used to generate a fake impression of an area light source. If this component is zero there will be no fake highlights and only the reflected rays can create highlight effects if they hit something bright.
lights (S06) Message0arrayoutputinputconnectablekeyable
lights is a local list of light instances specifying just those light sources which should be used with the normalized phong highlight. If this list is omitted, the global list of light instances is used (that is, all light sources in the scene graph).
outValue (S07) float30, 0, 0outputconnectable
Resulting color.
outValueR (S07R) float0outputconnectable
Resulting color red component.
outValueG (S07G) float0outputconnectable
Resulting color green component.
outValueB (S07B) float0outputconnectable
Resulting color blue component.