Page History
...
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Parameters
...
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Examples
...
For the examples below we use a user attribute to several objects. The attribute value is read with a userScalar texture that passes the value 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.
With the help of a user attribute we can control any scalar (float) parameter of the shader.
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 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 the VRayMtl Reflection Glossiness parameter. A user attributed named reflectionGlossiness is used to specify different values for the reflection glossiness of two objects.
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Example: VRayUserScalar with VRaySwitchMtl
This example 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 a VRaySwtichMaterial. A VrayUserScalar is linked to the SwitchMtl's Material Switch slot and a user attribute named outputMaterial is used to drive the material distribution.
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|