This page provides information on the V-Ray Multi Sub-Object Map.
Overview
The VRayMultiSubTex texture distributes multiple textures to many objects via one single material based on specified IDs or a random distribution.
In the image shown here, VRayMultiSubTex's Get ID from parameter has its type set to Object ID. Each part of the ball is assigned a texture. The VRayMultiSubTex is then assigned to the diffuse channel of a single VRayMtl.
Parameters
Default Color – Specifies a default color or texture for objects without Object IDs.
Get ID from – Specifies the meaning of the ID parameters.
Use face material ID – When more than one material is applied to the different faces of the same object, Maya internally creates face IDs. If all those materials share the same VRayMultiSubTex, V-Ray will considers the face IDs when feeding the data (color or texture) to the materials.
Use object ID – The VRayMultiSubTex considers the Object IDs of the object when feeding the data (color or texture) to the material.
Random by RenderID – The VRayMultiSubTex assigns random colors based on RenderIDs (internally generated by V-Ray).
Random by node name – Generates a color index based on the name of the node that the texture is applied to.
Random by instance ID – The VRayMultiSubTex assigns random colors based on the IDs of objects instanced with the particle instancer in Maya.
Texture Switch – Enables the Switch texture parameter to determine which texture is used in the material.
Switch texture – A floating point value that calls the texture from the Texture List (below in the UI) by the ID number.
Interpolate – If the switch value falls between two textures from the Texture list, this interpolate between them. Otherwise, when disabled, the closest texture from the list is used.
Loop Through Textures – This option works in Use face material ID and Use object ID modes. When the faces or objects assigned with VRayMultiSubTex map are more than the sub-textures in the map, the Loop Through Textures option goes through all sub-textures and once they finish, reverts to the first sub-texture, continuing until all faces or objects get a sub-texture. In Use object ID mode all objects with assigned ID different than 0 get a sub-texture. The ones with object ID equal to 0 get the Default color.
Seed – When the mode is set to Random by node name, this parameter allows the user to change the randomization pattern.
Add New Item – Adds a new sub-texture to the texture list.
Used – Enables the sub-texture for rendering.
Value – For modes that use IDs, specifies the ID that corresponds to each texture.
Example: Loop Through Textures
The following example shows how the Loop Through Textures option affects the distribution of texture applied to five geometries with different IDs.
Here, we have a MultiSubTex map with four sub-textures whose interval of valid IDs is [1 - 4]. We also have five geometries whose IDs range from 1 to 6. The IDs of the first four geometries fall within the texture's interval. The fifth geometry's ID (6) is outside that interval. We also have a default color - red.
When the Loop Through Textures option is disabled, the geometries with valid IDs get a texture of equal ID number. The texture whose ID is 6 gets a default color.
When the Loop Through Textures option is enabled, the geometry with ID = 6 is looped and gets the texture with ID = 2.
If we uncheck one of the textures, for example texture with ID = 2, V-Ray detects that there is no valid texture for the geometries with IDs = 2 and 6, and it assigns them a default color.
Common Uses
A few typical uses for the MultiSubTex Map are as follow:
- Animated values for Switch texture
- User attributes passed with userScalar
- Expressions (most common is "= frame" to pass the current frame number as the switch driver)