You are here

GetUserDataInt Shader

The Crowd Get User Data Int Shader for MentalRay is a Mental Ray shader which is able to read an integer user data of a given name stored in the currently rendered mesh, and return its value. This data can be used to feed other shaders (such as a Crowd Switch Shader). Refer to the Shader Attributes page to know how to store integer user data in a mesh.

Result of a Get User Data Int Shader combined with a Crowd Switch Shader and different user data values.

Creation

To create a Crowd Get User Data Int for Mental Ray, the Mental Ray plugin must be loaded.

Hypershade: MentalRay / Miscellaneous / CrowdGetUserDataIntMentalRay

MEL command: createNode CrowdGetUserDataIntMentalRay;

Configuration

Param Name

Name of the integer user data attribute to read in the rendered mesh and which will be returned. The name of the user data should be the same than the one defined in the Shader Attributes of the Mesh.

Default

Default value to return if the corresponding user data is not found

Shading Graph Integration

This shader can be used to feed an integer value of any other shader. The output attribute of this shader is called outValue.

In the following example the Crowd Switch Shader has 3 textures connected to its 3 first Shader slots. Its Selector value is fed by a Crowd Get User Data Int shader and its output is connected to the Color attribute of a Blinn Tshirt shader.