Page tree

Contents

PxrVary

The PxrVary pattern allows for random variation.  Let's try varying the color of the teacups based on the Particle ID.

Select the nParticleShape1 node. Look under the Instancer attributes. Change the Object Index from None to Particle ID.

This causes a primvar called particleId to be available on the instances.

 

Next, wire a PxrVary pattern into the color of the material used for each of the cup and the saucer.

 

 

Set up the PxrVary to use the particleId as its seed for randomization.  

  • Change the Vary Source to Primvar.
  • Type in particleId as the Variable Name.
  • Move the Hue slider value to 1, for maximum variation of the hue.

Now the render looks like this: