Tuesday, 17 June 2014

Passing rgbPP to Instanced Objects

This is a nice one that I have needed quite a lot in the past. Now, thanks to Arnold, it's extremely easy to do.

Here is the problem:

I want to vary the shading on objects that are instanced to a particle system.

In Maya and Mental ray this is not easy to do. In fact I don't know of any way to do it. In Arnold, however, it is very straightforward:

1. Create your particle and instancer system as you normally would do.

2. Assign a shader to your instanced objects (not the instancer object)

3. create an aiUserDataColor node

4. type rgbPP in the Color Attr Name in the aiUserColor node

5. connect aiUserDataColor.outColor --> diffuse in your shader (or whatever channel you need it to go to)

6. type rgbPP into the Export Attributes in the Arnold section of the particle object.


 That's it. A really easy and long overdue feature.









1 comment:

  1. Hi, great post!

    Do you have any experience in using Realflow and exported channels, and using them with aiUserDataColor? Trying to create a colour blending effect (i.e paint mixing) and have 3 particle systems blending with eachother.
    Would be handy to know! As realflow mesher object doesn't have rgbPP.

    If not, my search continues! Thanks

    ReplyDelete