Recently I’ve been doing a lot of cg rain enhancement to shots, and generally not super happy with the results. After reading this paper and this one by Kshitiz Garg and Shree K. Nayar, I’ve started using unique textures for my rain drops instead of generic ‘streaks’. So I needed to be able to assign random textures to instanced Geo on a PerParticle basis in Maya. I couldn’t use Sprites because they always orient themselves to the camera which wouldn’t work for looking up at the rain or down thru the rain etc. The Particle instancer is pretty easy to use if you’re using a geo sequence or only using one piece of geo on all the particles. The process for achieving random geo PerParticle is a little convoluted so I thought I’d write it up for my own benefit and for anyone else looking for the way to achieve this.
One note: I’m not so much a dynamics artist so this’ll be pretty rudimentary if you are.
04: On the particle node you need to create a new general dynamic attribute. Give it a name, I’m using ‘RandomGeo’ be sure ‘per-particle float’ is selected.
05: Now on your particle node under the perParticle (array) attributes you should see the attribute you just created. RightClick in there and create expression.
06: The expression should be: particleShape1.attribute = particleShape1.id%number;
Where attribute is the PerParticle attribute you created, in my case ‘RandomGeo’ and Where number is the number of objects in your instancer, in my case 15.