Page tree

Versions Compared

Key

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

Image Modified

Simple PxrVary Example

One of the most common requirements of shading in animation or visual effects is varying the shader attributes efficiently for many objects. This can be anything from crowd simulations to leaves in a forest. This variation can make scenes more realistic and visually appealing. However, having to hand-alter dozens to hundreds of shaders can be prohibitive. This is where PxrVary comes in!

Image Modified

Attached is a Katana example file showing how to use OpScripts to generate the source variables when using the pattern. Read about the logic of the scene setup below.

...

The OpScript is assigned just below the primitive create. Each one is slightly different.

Image Modified

From here you will notice there are different outputs, four exactly, illustrating the different results from using different PxrVary sources (Name, ID, PrimVar, Attribute). Rendering each of these will produce a different colored sphere. Download the scene to experiment!

...