Versions Compared

Key

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

This page provides information on the V-Ray Multi Sub-Object Map.

 


Overview

...

Section
Column
width62%

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.

More information on how to use the VRayMultiSubTex is available on the Randomization Options courseware page.

 


UI Expand
titleUI Path: ||Hypershade|| > Create panel > VRay section > 2D Textures > VRay Multi Sub Tex

Image RemovedImage Added

Column
width5%

 


Column
width33%

 

...



Parameters

...

Section
Column
width55%

Default Color – Specifies a default color or texture for objects without Object IDs.

Get ID from – Specifies the meaning of the ID parameters. The dropdown menu offers the following three options:

Random – Randomizes based on the selected option below.
Use object ID – The VRayMultiSubTex considers the Object IDs of the object when feeding the data (color or texture) to the material.
Texture Switch – Enables the Switch texture parameter to determine which texture is used in the material.

When Get ID from is set to Random, the following checkbox options are active. You can select multiple options at once.

By Object ID The VRayMultiSubTex assigns random colors based on the Object IDs of the objects.
By Render ID
– The VRayMultiSubTex assigns random colors based on RenderIDs (internally generated by V-Ray).
By Node name – Generates a color index based on the name of the node that the texture is applied to.
By Instance ID – The VRayMultiSubTex assigns random colors based on the IDs of objects instanced with the particle instancer in Maya.
By scene name – The VRayMultiSubTex assigns random color/texture based on each object's full scene path. A full scene path means that it can be used for multiple objects with the same name but located on different levels/branches in the hierarchy of the scene, e.g. instances in different groups. This option preserves the same random result per object, even if one or more objects are added or deleted from the group.
By Poly Shell – Randomizes color/texture per poly shell of an object.
By User ID – Randomizes textures based on a User Attribute assigned to the specific objects and set in the User Attribute field of the VRayMultisubTex.

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 object ID mode. 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.

Random Hue/Sat/Gamma – These three parameters control the randomization of the output color. Input value is percentage of the HSV/gamma range and specifies the maximum random deviation, where gamma range is fixed to [1/10,10]. See the Random Hue/Sat/Gammaexample below.

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.

Column
width5%

 


Column
width40%

How to Set up

...

Section
Column
width45%

To set up the VRayMultiSubTex:

  1. Connect VRayMultiSubTex to the material's desired input slot.
  2. From Texture List > Add New Item button add the needed number of subtextures.
  3. Connect the created textures to the VRayMultiSubTex subtexture slots, or create new subtextures from the checkered buttons in the Texture List.
 
Column
width5%

Column
width50%

 


...

Anchor
HSG
HSG
Example: Random Hue/Sat/Gamma

...

Section
bordertrue
 
Column
width25%

Column
width50%
Image slider
Panel
borderStylenone

No Random Hue/Sat/Gamma applied

Panel
borderStylenone

Hue = 100.0

Panel
borderStylenone

Saturation = 100.0

Panel
borderStylenone

Gamma = 100.0

Panel
borderStylenone

Hue/Sat/Gamma= 100.0

Column
width25%

 

 

...

 




...


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.

...

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. 


Section
Column
width50%

Column
width50%

 


When the Loop Through Textures option is enabled, the geometry with ID = 6 is looped and gets the texture with ID = 2. 


Section
Column
width50%

Column
width50%

 


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. 


Section
Column
width50%

Column
width50%

...