Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width62%

User attribute name – Specifies the name of the user attribute that is looked up and returned from this shading node.

Default value – Specifies the value to return if the user attribute is not found on the shaded object.

Required format for attribute name – Displays possible formats for the attribute in the V-Ray User Attributes string assigned to the object, and what is rendered as a result.

Column
width5%

 

Column
width33%

 

 

Examples

...

For In the examples below we use a user attribute to several objects. The attribute value is read with a userScalar texture that passes the value , user attributes are assigned to different objects with different values. A VRayUserScalar texture reads the values and passes them to a shader at render time. This way we can pass different shader values that are controlled at the object level, allowing us to share the shader between all objects.

...

Note that alembics coming from other applications, e.g. Houdini, with custom attributes already baked in, can be read in the same way as the user attributes. See the the Houdini to Maya Alembic Workflow tutorial for more information.

User attributes can be added though the Attributes > VRay > User attributes menu.

Example: User Properties

 

This example shows the format for the value of the user attribute and how it is interpreted. The VRayUserScalar texture is used to control controls the VRayMtl Reflection Glossiness parameter. A user attributed named reflectionGlossiness is used to specify different values for the reflection glossiness of values on two objects.

 

Section
Column
width25%

 

Column
width50%

The same material is applied to the two objects with a both objects. A VRayUserScalar texture controlling the reflection glossinesspasses the values to the shader.

Column
width25%

 

 

 

Section
Column
width15%

 

Column
width30%

User attribute for the first object

Column
width10%

 

Column
width30%

User attribute for the second object

Column
width15%

 

...

Example: VRayUserScalar with VRaySwitchMtl

 

This example uses VRayUserScalar to control how materials from a VRaySwtichMtl are distributed to different objects.

shows how VRayUserScalar determines the distribution of two materials linked in a VRaySwtichMtl to two objects. Two different VRayMtls are linked as Material 0 and Material 1 of in a VRaySwtichMaterial. A VrayUserScalar is linked to used as the SwitchMtl's Material Switch slot and a user attribute named outputMaterial is used to drive drives the material distribution.

...

Section
Column
width30%

 

Column
width40%

The left sphere received receives Material 0 and the right sphere received receives Material 1

 

Column
width30%