Introduction


  • This presentation will take you through using the User Color and User Scalar Utility textures in V-Ray for Maya
  • The information centers around the VRayUserColor and VRayUserScalar texture nodes
  • This lesson topic is approximately 30 minutes in length
  • Presentation covers all 3 Learning Cycles for the Lesson Topic – Lecture, Demonstration, and Activity

 



Contents


Overview
Available Materials
Lecture
Video Demonstration
Activity                                                                                                                                                                                                                                                                 
Additional resources


Overview


Goal – Create more complexity in or scene by giving similar objects a range of color differences very quickly through utilities built into V-Ray  

Objective – We will incorporate two of the V-Ray Utility Textures into our 3D scene.   

Outcome – You will be able to apply the VRayUserColor and VRayUserScalar textures to your materials to quickly create more variety and randomness to your scene through additional V-Ray User Attributes   

 


 


Available materials


To set up the lesson follow the links below and download all available materials.

Lesson plan download
Presentation (Lecture) download
Demonstration tutorial 1 download
Demonstration tutorial 2 download                                                                                              
Scenes & Assets download                                      

 

Lecture



1. Terminology

Sometimes creating randomness in our scenes can be simplified by using Utilities.

Here’s some terms to  know when thinking about the VRayUserColor and VRayUserScalar textures.

  • User Attributes
    • Custom V-Ray attributes that can be added to objects to link properties together
  • User Color
    • Utility texture that returns up to a four channel value (RGBA such as 120,38,186,1) which can be connected to User Attributes to adjust the color of a material
  • User Scalar
    • Utility texture that returns a single numerical value which can be connected to other textures or materials through User Attributes

 

2. User Attributes


User Attributes Overview

 

 

  • User Attribute is added to an object
    • This attribute is then used by the textures VRayUserColor and/or VRayUserScalar to provide per-object values for shading attributes, making it easier to work with multiple object that need different colors, for example
  • You can specify your own attributes
    • Can also be used in the file name of File nodes to resolve a bitmap file name on a per-object basis
    • Several attributes can be specified in the string, separated with a semicolon   ;   character
    • User attributes can also be specified on transform nodes

The final string of user attributes for a given object is a concatenation of the user attributes specified on the shape of the object and the user attributes specified on its parent nodes along the DAG path
This allows to conveniently add attributes to a large part of the DAG hierarchy.

  • Animated User Attributes
    • If you need to animate the value of a user attribute, you can create a custom dynamic attribute attached to the shape or transform of an object, and animate its value
    • The dynamic attribute must be named vrayUserColor_attrName or vrayUserScalar_attrName or vrayUserString_attrName depending on the attribute type
    • You can then use the tag <attrName> in textures like VRayUserColor, VRayUserScalar and the file name of a File node

 

3. User Color


User Color Overview

Used to return up to four numerical values (think RGBA) of a specified V-Ray User Attribute assigned to an object
Intended to be used with parameters that require a vector input (diffuse color, reflect. color, normals bump, etc.)

  • User attribute name – the name of the User Attribute that will be looked up and returned from the shading node
  • Default color – the color 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 will be rendered as a result

 

 

  

4. User Scalar


User Scalar Overview

Used to render a single numerical value (normally 0-1) of a specified V-Ray User Attribute assigned to an object
Intended to be used with parameters that require a single value (refl./refr. glossiness, anisotropy, Amounts, subdivs, etc.)

  • User attribute name – the name of the User Attribute that will be looked up and returned from the shading node
  • Default value – the number 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 will be rendered as a result

 

 


 

 

5. Utility Textures


a) Example 1

In this example, the User Scalar node is used to drive the use of one of five different file textures used for scratches, which separates the two main diffuse materials and the bump

 


 

 

b) Example 2

In this example, the User Scalar node is used within a particle system to create a variation of the color chosen from a ramp to be used on the roof tops

 


 



 

Conclusion


a) User Attributes

  • User specified attribute that can be used to randomize render results

b) User Color

  • Used to connect a vector value to a custom User Attribute

c) User Scalar                                                                                                                                                                         

  • Used to connect a numerical value to other value to speed up the process of creating randomized results

Demonstration



Time to see it work! 

Watch while I demonstrate how to create and configure the two Utilities textures on the different objects in our scene.

 

 

 

 

Activity



Time to do it yourself!

Now it’s your turn!! Use the provided scene file to recreate the cinematic look as you have seen me demonstrate.

 

 

Dialing in the right values:

  • Pencils_Coat_Mtl
    • Pencils_Coat_Diff (Ramp) connected into the Diffuse Color
      • Ramp colors positioned .05 units apart (values inside color range used to call up them up from their ID)
    • Pencils_Coat_Diff_Scalar connected to Uv Coord of ramp
      • Looking for User Attribute id on assigned objects
  • Caps_Mtl
    • Caps_Color_UserColor2 connected to Diffuse Color
      • Looking for User Attribute color on assigned objects
      • Objects have RGB values for
  • Paint_Jars_Base_Mtl
    • details

 

 

                                                                                                                                                                            

 


Additional resources


Find more training resources listed below: