Layer

Overview

A Layer assigns scene objects (e.g. materials, volumes, light sets, etc) to geometry objects, or to a subset of the parts of a geometry object. For example:

Layer("/Scene/layer") {
    {SphereGeometry("geom1"), {""}, DwaRefractiveMaterial("mat1"), LightSet("lt_set1")},
    {SphereGeometry("geom2"), {"part2", "part5"}, DwaBaseMaterial("mat2"), LightSet("lt_set2"), ShadowSet("sh_set2")}
}

In this Layer, the DwaRefractiveMaterial “mat1” and the LightSet “lt_set1” are assigned to the whole of SphereGeometry “geom1”, and the DwaBaseMaterial “mat2”, the LightSet “lt_set2”, and the ShadowSet “sh_set2” are assigned only to parts “part2” and “part5” of SphereGeometry “geom2”.

Note that all geometry objects in the layer must also be included in the scene’s geometry set. In the example above,

GeometrySet("/Scene/geoset") {
    {SphereGeometry("geom1"),
    {SphereGeometry("geom2"),
}

Note also that if a parts list contains only one entry (either the empty string or a single part name), the braces can be optionally be omitted. For example:

Layer("/Scene/layer") {
    {SphereGeometry("geomA"), "", LightSet("lt_set")},
    {SphereGeometry("geomB"), "part42", LightSet("lt_set")}
}

Attribute Reference

General attributes

displacements

Displacement Vector
default: {}

The displacement shaders assigned to geometry objects in the layer, or to their specified parts.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, "", myDisplacement, ...}
}

geometries

SceneObjectIndexable
default: None

The geometry objects included in the layer, each of which must be included in the GeometrySet.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry1, "", ...}
{myGeometry2, "", ...}
}

lightfiltersets

LightFilterSet Vector
default: {}

The light filter sets assigned to geometry objects in the layer, or to their specified parts.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, "", myLightFilterSet, ...}
}

lightsets

LightSet Vector
default: {}

The light sets assigned to geometry objects in the layer, or to their specified parts.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, "", myLightSet, ...}
}

parts

StringVector
default: {}

For each geometry object in the layer, the list of names of the parts of that geometry to be included.
To include all parts of a geometry object without needing to name them explicitly, use the empty string, "".
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, {"part1", "part2"}, ...}
}
If the list contains only one entry (either the empty string or a single part name), the braces can optionally be omitted. For example,
Layer("/myLayer/") {
{myGeometry, "part1", ...}
}

shadowreceiversets

ShadowReceiverSet Vector
default: {}

The shadow receiver sets assigned to geometry objects in the layer, or to their specified parts.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, "", myShadowReceiverSet, ...}
}

shadowsets

ShadowSet Vector
default: {}

The shadow sets assigned to geometry objects in the layer, or to their specified parts.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, "", myShadowSet, ...}
}

surface_shaders

Material Vector
default: {}

The materials assigned to geometry objects in the layer, or to their specified parts.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, "", myMaterial, ...}
}

volume_shaders

Volume Vector
default: {}

The volume shaders assigned to geometry objects in the layer, or to their specified parts.
Note: this attribute is typically not set directly, but by using a Lua table for defining layer entries. For example,
Layer("/myLayer/") {
{myGeometry, "", myVolumeShader, ...}
}