Page tree

Contents

PxrRandomTextureManifold with PxrMultiTexture to assign random textures to many objects:

  • Randomly assign up to 10 textures to a group of objects.
  • Randomize the texture orientations and offsets.
  • Assign textures by setting the value of a primitive variable (see Adding the textureID primvar in Maya)

PxrRandomTextureManifold can only be used with PxrMultiTexture.

Input Parameters

Number of Textures

The number of texture you want to use. You should have at least one texture and PxrMultiTexture supports up to 10 textures.

Texture Order

The order in which PxrMultiTexture will assign its textures to the objects.


ValueModeDescription
0Ordered

Textures ordered based on the random source. The number will wrap in the 0->numTextures range.

When using the textureID PrimVar, the texture index will match the primvar.

1RandomTextures randomised based on the random source.


Tiling

Tiling Mode

Select between Regular and Hexagonal tiling modes

Frequency

Texture frequency 

Blend Width

Exponentiated blending as described by Burley


Randomize

Random Source

For each object to get a different variation, you need to select something unique about them to create a unique seed. You have a choice between the object's id, the object's name and a "textureID" primitive variable.

ValueSourceDepends on
0
Object Id
Attribute "identifier" "float id"
1
Object Name
Attribute "identifier" "string name"
2textureID PrimVar
"constant float textureID" [0]
  • The first two attributes are created by the software outputting the RIB and depending on your application (Maya, Katana, etc...), one may work better than the other.
  • The textureID primitive variable needs to be created on your scene shapes and set to a value between 0 and 9 (PxrMultitexture supports up to 10 textures). If this mode is selected and the primvar does not exist, the pattern will assume a value of 0, i.e. the first texture.

Extra Seed

If you want one of these patterns to compute a different variation, set the randomExtraSeed to a non-zero value. This parameter will only influence the randomization parameters (randomOrientation, randomFlipS, etc).

Random Orientation

Randomize the orientation of the textures by randomly swapping s and t.

Random S Flip

Randomly flip the direction of s.

Random T Flip

Randomly flip the direction of t.

Random S Offset

Randomly offset s. You should probably avoid this if your textures are not tiling seamlessly.

Random T Offset

Randomly offset t. You should probably avoid this if your textures are not tiling seamlessly.


Manifold 2D

Angle

Global rotation angle around the origin of the st domain.

Global Scale

Scale the st domain while preserving the aspect ratio defined by scaleS and scaleT.

Scale S

Frequency of the feature in S.

Scale T

Frequency of the feature in T

Offset S

Offset from origin in S.

Offset T

Offset from origin in T.

invert T

Invert the direction of T.

PrimVar S/ST

Name of custom 1D S or 2D ST primvar.

PrimVar T

Name of custom 1D T primvar.


Adding the textureID primvar in Maya

Using MEL

Select the objects you want to add the primvar to and run the MEL below.

addAttr -at "float" -ln "rmanFtextureID" -k true -dv 0.0 `ls -sl -dag -shapes`;

The "rmanFtextureID" will appear in the channel box and the attribute editor so you can set its value and will be exported by RFM as the expected "float textureID" primvar.