Per Particle attributes on instances


#1

Yes, I’m sorry I know this has been mentioned a billion times, but nowhere did I find a clear and efficient answer.
So CG artist Lee Griggs did This using Arnold renderer.
And mavencolby did This using Renderman.
Except this time only the size is linked to a per particle attribute. The color is just made with a random switch between a bunch of objects.

Well, I want to be able to use the color of particles based on age or speed or an image or anything, but not with Arnold since it’s not free. I can use Renderman, or 3Delight, or also SOup or whatever works (for free) but I don’t want to bake anything since I’m dealing with huge number of particles.

I had a hard time trying to reproduce what mavencolby and These guys did by using the files they provided but I got nothing.
I guess I’m just a douchebag or just very tired but I’d love some help.


#2

I found it ! Here’s how to use per particle color, opacity and incandescence on instances !

               Download and install 3Delight for Maya (free for personal and commercial use)
               Load 3Delight plugin in Plugin manager
               In a new scene, create a nparticle emitter
               create any mesh object
               assign it a new lambert (or any material)
               assign the same material to the particles (select nparticle, then Lighting/Shading > Assign existing material)
               in the hypershade, create a renderman code (under maya > utilities)
               In Shading parameters, add:
output color finalColor;
output float finalOpacity;
output color finalIncandescence;
               In shading code, add :
color particleColor;
attribute("user:rgbPP", particleColor);
finalColor = particleColor;
float particleOpacity;
attribute("user:opacityPP", particleOpacity);
finalOpacity = particleOpacity;
color particleIncandescence;
attribute("user:incandescencePP", particleIncandescence);
finalIncandescence = particleIncandescence;
               Connect the "Final color" output to the "color" input of the material

Connect finalOpacity to transparency R, G and B
Connect finalIncandescence to incandescence.

               In the 3Delight tab, open the 3Delight relationship editor
               On the right side, Create a Geometry attributes node
               Click on nParticleShape1 and then on delightGeoAttribs1 (it automatically connects them)
               In delightGeoAttribs1 attributes, click on Add/Remove Attributes and choose Attributes > Geometry > Particles > Particle System Variables
      
      You may want to hide the particles or use another render layer without the particles in order to avoid glitchy noise
               
               Render with 3Delight
               
               Boom !
             
             Here's an example of using rgbPP on instanced cubes :