PxrAttribute Shader

Renderman provides his own shaders to read and return user data PxrAttribute. This data can be used to feed other shaders (such as a Crowd Switch Shader or a Crowd HSL Shader). Refer to the Shader Attributes page to know how to store user data in a mesh.

Result of a PxrAttribute Shader combined with a Crowd Switch Shader and different user data values.


To create a PxrAttribute shader for Renderman, the Renderman plugin must be loaded.

  • Hypershade: Renderman / Pattern / Utility / PxrAttribute
  • MEL command: createNode PxrAttribute;


Variable Name Name of the 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.
Variable Type Type of the user data attribute to read in the rendered mesh and which will be returned. Valid values for Golaem are int, float, vector
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 resultF (int / float) or resultRGB (vector).
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 PxrAttribute shader and its output is connected to the Color attribute of a Blinn Tshirt shader.
In the Character Maker Geometry Tab, the Tshirt Shader has an Integer User Attribute named "textureId" which will have a random value between 0 and 2 (notice that this value can also be controlled with a ppAttribute) :

Then, the PxrAttribute Int is configured to read the parameter "textureId":
At render time, Entities having this Blinn Tshirt shader listed in their Assets, you get the following result: