© Square Enix © Goodbye Kansas


Table of Contents

This page contains information about the V-Ray TexUserScalar node.


Overview



The V-Ray User Float texture allows the user to read and return a single number value from the User-Defined properties of the currently shaded object as a result. This can be useful if the same material or texture is applied to several objects in the scene, but we want to control some of its aspects (i.e. material glossiness, or a blend between two other textures inside a Mix texture etc.) with User-Defined properties.


 


Parameters


Attribute – 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.

Attribute Priority – Specifies the attribute priority of V-Ray User Float.

User Attribute
Map Channel



Examples


In the examples below, user attributes are assigned to different objects with different values. A V-Ray User Float 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.

With the help of a user attribute we can control any scalar (float) parameter of the shader.

User attributes can be added though an Attribute Wrangle node or an Attribute Create node.


Example: V-Ray Float controlling metalness


This example shows the format for the value of the user attribute and how it is interpreted. The V-Ray User Float texture controls the V-Ray Material Metalness parameter. A user attributed named metalness_value is used to specify different metalness values on two objects.


The same material is applied to both objects. A V-Ray User Float texture passes the values to the shader.




User attribute for the first object


User attribute for the second object



Although the two objects have the same material, the metalness is determined by the user property.



Example: V-Ray User Float with V-Ray Multi ID Material


This example uses V-Ray User Float to control how materials from a V-Ray Multi ID Material are distributed to different objects.

Two different V-Ray Materials are linked as Material 1 and Material 2 in a V-Ray Multi ID Material. A V-Ray User Float is linked to the mtlid_gen_float slot and a user attribute named outputMaterial drives the material distribution.


The same V-Ray Multi ID Material is assigned to two spheres and the V-Ray User Foat texture determines how Material 1 and 2 are distributed between the spheres.



User attribute for the first object


User attribute for the second object



The left sphere received Material 1 and the right sphere received Material 2