How To

In this section I go over how to use each sections to create a unique attribute.

rmanC

This attribute is suitable for adding color variation. Using this UI, you have options to create:

  • random color
  • random shade of color
  • random grayscale
_images/randomBaseColorManager.png

As you can see in above image, you have control over the name of the attributes, shade of color, value and saturation.

Note

All the color system in this UI is HSV.

Here are some examples of using this attribute to generate different results:

Random Color

  1. Choose a new attribute name
  2. Select a random color option
  3. Modify the saturation and value as you desire

Note

(optional, this apply to all the Primvar attributes) specify the name of the PxrPrimvar node. This option will you help to set the correct name and attributes on the PxrPrimvar node.

  1. Select your objects, and click on the assign button to attach the new attribute to them.
  2. Set the same attribute name to the PxrPrimvar node and set type to color. If had already specified name of the PxrPrimvar in the UI, it’ll bee set automatically.
_images/randomColorPxrPrimvar.png
  1. Connect the RGB output of the PxrPrimvar to any input color of your shade, in this case baseColor.
_images/connectPxrPrimvarColor1.png _images/connectPxrPrimvarColor2.png

Here is the result:

_images/randomColor_result.png

Important

If you open the shapeNode attribute editor of any of the objects, you’ll see the new attribute is added.

_images/shapeNodeAttributeaditor.png

Random Shade of Color

  1. Choose the Random Shade of Color option.
  2. Click on the color picker button next to it an pick a Hue. Remember that you are just picking a hue in HSV color system, meaning that value and saturation will be adjust in the following section.
_images/selectColor.png
  1. Set the Max and Min of the Value and Saturation to add some variation to the Hue
  2. Assign the attribute, and connect the result RGB of the PxrPrimvar to the color input.
_images/randomBlue_result.png

Random Grayscale

And here is the result of using the Random Grayscale options.

_images/randomGrayscale_result.png

rmanF

This a useful variable for make variation in any shader attribute that gets floating number as an input, such as Specular, Roughness, Bump, *Metallic, and so on.

To demonstrate this, I assigned a PxrLMMetal to all the Spheres, and the result is as follow.

_images/metallic_result.png

Then click on a Create button to make a new Primvar attribute UI.

Make sure to: Give it a meaningful name. *Choose a appropriate *value type (the float type is more common) Adjust the *min/max limit.

_images/randomRmanF.png

Note

As previously mentioned, if you specify the PixPrimvar node name,

it’ll automatically adjust it’s value.

_images/rmanFPixrPrimVar.png

After assigning the attribute to the selected objects you’ll see newly created attribute on the shape node.

_images/attachedRmanFAttr.png

Then from PxrPrimvar node, connect the Result F to the any shader’s attribute that you want to make variation, in this case I’m going to connect it to the roughness.

_images/connectPxrPrimvarFloat1.png _images/connectPxrPrimvarFloat2.png

Once they’re connected the result is as follow:

_images/rmanF_result.png

rmanS

This attribute is ideal for use for any texture input, such as diffuse color, specular, alpha.

  • Click on the create button.
  • Provide the name of a texture read node. (Either Maya’s native File Texture node, or Pixar’s PxrTexture Node)
  • Click on the Gather Files to select the images that you want to use.
  • Select your geometries and lick on Assign.

Note

I used some leaves textures from www.textures.com

_images/createRmanS.png

If you select a shape node, in the Extra Attributes, you’ll see there’s a new string attribute.

_images/rmanSShapeNode.png

Next, connect the Output Color of the texture file to the Surface Color of your shader. (As you can see in the following graph, if the image has alpha channel and you want to use it, connect it to the appropriate inputs)

_images/rmanSConnection.png

Note

Make sure you leave the File Path of the texture node empty.

_images/rmansFilePath.png

I applied this to few simple planes,

_images/rmanSMayaScene.png

And here is the result of the:

_images/textureRGB_result.png _images/textureA_result.png