Our Production 2 class has recently moved to the subject of particles. Last class Elliot delved into the emission of multiple particle types from one emitter. For example an explosion of rocks. First modeling 5 different rocks then having the directional emitter disperse them in an explosion type animation. I’m going to use this blog entry to explain the step by step how to do this in Maya. There are some expressions used that can be kind of confusing so for this example I’ll just lay out how to have the emitter randomly select and emit your 5 pre-modeled rocks.
Under the ParticleShape tab in the particle attribute (per particle (array) attributes):
->Add Dynamic Attributes General button
-give it a Name
-Data type= Float
-Attribute= Per particle (array)
-OK
-right click on the blank space of your newly created Attribute
-creation expression
In the expression editor:
-MMB drag contents of Selected object and attribute box to the expression space below. In this case it’s debrisShape.customIndex
then add the following (for 5 different objects) so you’ll get:
debrisShape.customIndex = rand(0,4.9);
(Click Edit and you’re golden if you don’t get an error)
4.9 because Maya truncates using the Float that was selected type earlier so if it’s any decimal between 4-4.9 it’ll truncate it and 4 will be selected.
Now in debris shape under general options in the drop down select the expression you made.
That’s it! To add realism to the animation you’ll have to add random speeds, rotations, scales etc… which is basically sets of different expressions. We’ll save those examples for a later date.