Versions Compared

Key

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

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


Overview

...


 

Section
Column
width50%

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.

Column
width5%


Column
width45%

  Image Added


Parameters

...

Section
Column
width

...

  Image Removed

 

 

 

50%

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

Column
width5%

 

 

UI Paths

section


Column
width45%33%

||mat Network|| > V-Ray > Utility Texture > V-Ray User Float

Column
width33%
||out Network|| > V-Ray Render Elements node > V-Ray > Utility Texture > V-Ray User Float
Column
width33%

 

 

Node

The TexUserScalar node provides inputs for controlling various texture properties. They correspond to parameters in the section below.

 

Image Removed

 

 

Parameters

 

Image Removed

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.

Image Added


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.


Image Added

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



Section
Column
width10%


Column
width35%

Image Added

User attribute for the first object

Column
width10%


Column
width35%

Image Added

User attribute for the second object

Column
width10%



Image Added

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.


Image Added

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.


Section
Column
width10%


Column
width35%

Image Added

User attribute for the first object

Column
width10%


Column
width35%

Image Added

User attribute for the second object

Column
width10%



Image Added

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

...