Set Shader Attribute

 
Original rendering, and result rendering of a SetShaderAttribute layout node : the t-shirt texture index attribute has been forced to a single value (red and yellow t-shirts) for entities on the left.

The SetShaderAttribute node forces the value of some specified shader attributes, on the affected Entities. The result is only in rendering as the shader attributes are not handled by previsualization.

Add node


SetShaderAttribute node in the Layout Graph Edition panel

Node parameters

Parameters are accessible by double-clicking on the node in the Layout Graph Edition panel:


SetShaderAttribute node parameters

Name Name of the node
Active Whether the node is active or not
shaderAttribute

nameOfTheShaderAttrToOverride newValue[;nameOfTheShaderAttrToOverride2 newValue2][etc.]. It is also possible to randomize the value by using the following template nameOfTheShaderAttrToOverride newValueMin newValueMax;

Each attribute not associated with a value will take its value from the sampled map according to the channel setting and the entity position on the texture map geometry. If the entity root cannot be located on the map, the attributes using the map are not set.

Examples:
tshirtIdx 1
shirtHue 0.9
shirtColorFromMap
pantsColor 0.8 0.3 0.3
RandomSeed This node use a specific random seed which can be modifier to change the attribute random pick results, when using random min/max values
Channel Which value to use for the shaderAttribute : RGB Vector, or red, green, blue or alpha channel single value.
Target The map target in the scene, used to sample values (in the RGB range [0-1]) at entity root position. This parameter will be used to automatically refresh all the following parameters.
Map

This parameters should not be edited directly by the user. It will be automatically updated when the target vector field changes.

Contains the texture map.

Geo Vertices

This parameters should not be edited directly by the user. It will be automatically updated when the target vector field changes.

Contains the geometry vertices on which the texture map is applied.

Geo Normals

This parameters should not be edited directly by the user. It will be automatically updated when the target vector field changes.

Contains the geometry normals on which the texture map is applied.

Geo UVs

This parameters should not be edited directly by the user. It will be automatically updated when the target vector field changes.

Contains the geometry UVs on which the texture map is applied.

Geo Triangles

This parameters should not be edited directly by the user. It will be automatically updated when the target vector field changes.

Contains the geometry triangles on which the texture map is applied.