DwaLayerMaterial

Overview


DwaLayerMaterial

The DwaLayerMaterial composites two materials together by layering A over B, using a mask attribute to control the blending. Networks of DwaLayerMaterials can be as arbitrarily deep as desired. Instead of evaluating each material separately, this material blends inputs’ respective parameters to produce a single BSDF.

As an example, if inputs material_A and material_B each have a specular lobe with respective roughnesses of 0.2 and 0.4, layering with a mask value of 0.5 doesn’t create both the lobes at half intensity, but rather results in a single lobe with roughness 0.3. But if material_A has a specular lobe while material_B does not, then the specular reflection color will be tapered (blended with black) by the mask while the lobe’s other attributes, such as anisotropy, are copied from material_A without blending.

There are a handful of attributes that cannot be blended, and for those the DwaLayerMaterial provides fallback attributes which really act as overrides for setting the attribute for the resulting layered material.

Lobe order or layering is not changed by the input order, as all lobes respect the ordering described in Dwa Materials. For example, you cannot use LayerMaterial to render a specular lobe atop a fuzz lobe.


Attribute Reference

Advanced attributes

blend_color_space

Int enum
  0 = “RGB” (default)
  1 = “HSV”
  2 = “HSL”

Color space used when blending the two material's color parameters

fallback_bssrdf

Int enum
  0 = “normalized diffusion” (default)
  1 = “dipole”
  2 = “random walk”

If child materials disagree on the type of bssrdf, this type will be used instead.

fallback_clearcoat_use_bending

Bool
default: True

If child materials disagree on the type of clearcoat use bending, this type will be used instead.

fallback_outer_specular_model

Int enum
  0 = “Beckmann”
  1 = “GGX” (default)

If child materials disagree on the type of outer specular model, this type will be used instead.

fallback_specular_model

Int enum
  0 = “Beckmann”
  1 = “GGX” (default)

If child materials disagree on the type of specular model, this type will be used instead.

fallback_thin_geometry

Bool
default: True

If child materials disagree on the type of thin geometry, this type will be used instead.

fallback_toon_specular_model

Int enum
  0 = “Beckmann”
  1 = “GGX” (default)
  2 = “Toon”

If child materials disagree on the type of toon specular model, this type will be used instead.

sss_trace_set

TraceSet
default: None

By default, only the geometry associated with this material contributes to subsurface. The DwaLayerMaterial ignores the sss trace sets of the submaterials. If you want adjacent geometry with different material to contribute as well, specify all those parts here.

Glitter Fallback attributes

fallback_glitter_LOD_quality

Float
default: 0.5

controls quality of glitter at distances where individual flakes cannot be perceived; at lower values, approximation kicks in earlier. This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_debug_mode

Int enum
  0 = “off” (default)
  1 = “blend”
  2 = “color”
  3 = “averageColor”
  4 = “footprintArea”
  5 = “radius”

developer debug visualization modes. This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_layering_mode

Int enum
  0 = “physical” (default)
  1 = “additive”

layering mode for glitter on top of the under material. physical: conserves energy and glitter attenuates under material, additive: breaks energy conservation but glitter is never darker than the under material (eg. use case: snow). This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_randomness

Float
default: 0.5

randomness of flake orientation. This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_seed

Int
default: 0

The seed for the glitter random number generator. This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_space

Int enum
  4 = “object”
  5 = “reference” (default)

The space to calculate the worley noise in, defaults to reference space. This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_style_A_frequency

Float
default: 1.0

0 implies none of this style, 1 implies all the flakes will get this style. This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_style_B_frequency

Float bindable
default: 1.0

0 implies none of this style, 1 implies all the flakes will get this style. This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_texture_A

String filename
default:

filename that points to a texture .exr or .tx file (must be mip-mapped and tiled with maketx). This parameter will only be used when layering two distinct glitter materials.

fallback_glitter_texture_B

String
default:

filename that points to a texture .exr or .tx file (must be mip-mapped and tiled with maketx). This parameter will only be used when layering two distinct glitter materials.

General attributes

extra_aovs

Map
default: None

Bind this attribute to a 'ListMap' that contains references to ExtraAovMaps that specify additional outputs that can be assigned to a RenderOutput "light aov" result

invisible_refractive_cryptomatte

Bool
default: False

Indicates whether material should/should not appear in the refractive cryptomatte layers

label

String
default:

label used in material and light aovs

mask

Float bindable
default: 1.0

foreground material weight

material_A

DwaBaseLayerable
default: None

foreground material

material_B

DwaBaseLayerable
default: None

background material

priority

Int
default: 0

The material's place in an order of precedence for overlapping dielectrics. A value of 0 means the priority should be ignored. Materials with lower numbers (higher priority) "override" materials with higher numbers (lower priority). To enable automatic removal of self-overlapping geometry, a non-zero priority must be set on the geometry's material.