Lets you maintain multiple layers of attributes.
This node allows you to work with multiple texture coordinate systems, or even multiple coloration layers. If the display option for Multi-pass Texturing is turned on (as it is by default) all of the layers will be drawn on top of one another from the bottom (layer 1) to the top.
Each of the default attributes (i.e. “Cd”, “uv”, etc) gets renamed according to the current layer. For layer 1 they have their base names. For every other layer, the current layer number is appended. Thus, on layer 5 the color of the object is determined by “Cd5”, not by “Cd” as it usually is. All operations will respect these new names when reading or creating attributes. The Point operation, for example, will use the “Cd5” to determine what $CR is instead of “Cd”.
In any operation with local variables, the current layer is $CURLAYER, the number of layers is $MAXLAYER.
Note
The Layer value does not affect the AttribCreate nor the AttribPromote surface nodes. The Layer value only affects implicit choices of attributes. Anywhere where an attribute is listed by name(for example: Cd), it will be taken literally.
Parameters
| Current Layer | The current working layer. All further operations in this network will affect the specified layer. If multipass texturing is off or the maximum layer parameter is set to 1, the current layer is displayed in the viewport. |
| Maximum Layers | The maximum number of layers which will be displayed for this operation for multipass texturing. Current Layer is the current layer for editing, not for display. If Maximum Layers is greater than 1, all layers up to $MAXLAYER are drawn on top of one another. Set this parameter to 1 to always view the current layer. |
| Override Merge Mode | If set, the default merge mode (on top) will be replaced by a custom defined one for this layer. |
| Source Blend | The multiplier factor for the source pixels. Check your OpenGL reference manual for details. |
| Destination Blend | The same, but for destination pixels. |
| Channel Mask | Which channels should be written to by this layer. |
| Custom Mask | Allows any of the 16 possible masks. It’s a bitfield with 1 being red, 2 green, 4 blue, and 8 alpha. Add up the numbers of channels you want to write to to get the magic number. |
| Pre-clear Window | If set, the window is cleared (using your mask) before any drawing is done. This is usually used to set up an alpha plane for stenciling. |
Examples
| MultiTexture | Load | Launch |
This example demonstrates the use of the layer SOP to layer multiple textures onto a single object. | |