When we first began making Gertie, Interrupted, I was interested in implementing particle systems.
It was clear after drawing up the storyboard that particles could play a very important part in the movie.
Our movie included a fireball, dust clouds, water splashes, smoke swirls, etc... All of these things
can be modeled and controlled using particle systems.
Sources
Here are the papers and articles that I read to prepare myself. If you are interested in implementing particle systems, these links should give
you more than enough information to help you meet this goal.
Particle systems -- a technique for modeling a class of fuzzy objects by William T. Reeves (Can be found in the ACM Digital Library.)
Fundamentally, my particle system implementation is a C++ program. The Maya plugin was built around this C++ program.
The goal of my plugin was to allow high level generation of particle systems within Maya. By high-level, I mean the user should be able to say,
"I want to create a dust cloud" and not, "I need a particle system with an average per particle velocity of .75, an average per particle life span
of 75 frames, this dust cloud per particle update function, ..." In order to meet this larger goal, two things had to be true:
The C++ program had to have enough flexibility that new particle system types could be easily added.
The user interface in Maya had to be easy to use and carefully defined.
To meet the first goal, I read Building an Advanced Particle System by John van der Burg. This article describes the types of parameters
that particle systems need in order to allow greater flexibility.
ParticlesUI.mel: A Maya Script file that defines the Maya User Interface for the Plugin
Step 2: Set Your Environment Variables
First, you need to set two Maya environment variables in windows.
MAYA_PLUG_IN_PATH: Set this variable to the location of the plugin
MAYA_SCRIPT_PATH: Set this variable to the location of the script
Step 3: Start Maya
Note: If Maya is already running, close it and restart it. Maya will not work right otherwise.
Step 4: Load the Plugin
Open the Plugin Manager as shown above.
Check the "loaded" box next to ParticlePlugin.mll in the Plugin Manager as shown above.
Step 5: Create a New Particle System
When the plugin loaded, it should have added a plugin menu to Maya's menu bar, as shown above.
Click on the "Particle Systems" menu item.
After selecting the menu item, the window above should appear. There are seven particle system types that can be created.
Dust Cloud: The particles in a dust cloud system appear to "float" on the air.
Fireball: The particles in a fireball system will shoot out from the center of the system
until it hits the radius of the fireball. Then the particles bounce back into the fireball.
Tail: This particle system creates a tail for the fireball.
Waterfall: The waterfall system shoots out particles in all directions. These particles are greatly affected
by "gravity" and, thusly, fall in a waterfall pattern. (This system was not used in Gertie, Interrupted.)
Watersplash: The particles in the watersplash shoot upward and have a small amount of "gravity".
MissileTail: This particle system creates a tail for the missles in Gertie, Interrupted.
General: This choice allows the user to create a generic particle system. When creating a general particle system,
the bottom of the creation window can be used to specify the parameters of the system.
Particles Per Second: The number of particles that the system should produce per second (i.e. every 30 frames). Note:
The plugin is set up so that particle system will not produce more than 2000 particles per second while in interactive mode. A
system with more than 2000 particles per second will show up differently when batch rendering.
Particle Number Variation: The maximum possible variation (+ or -) in the number of particles produced per frame.
Yaw Variation: The maximum possible variation (+ or -) in the yaw of each particle.
Pitch Variation: The maximum possible variation (+ or -) in the pitch of each particle.
Velocity: The velocity of an individual particle (in units per frame).
Velocity Variation: The maximum possible variation (+ or -) in the velocity of each particle.
Particle Life: The number of frames for which a particle will "live".
Particle Life Variation: The maximum possible variation (+ or -) in the life of each particle.
Particle Size: The size of the individual particles.
Lines: When not clicked, the particles will be cubes. When clicked, the particles will be "spikes"
that extend from the previous location of the particle to the new location of the particle.
Clicking OK will create the new particle system.
Step 6: Tweek the Particle System
All of the basic Maya controls will work with the new particle system (move, scale, rotate, etc...)
To tweek the internal particle parameters, click on the particle system and press CTRL-A to open the Attribute Editor. This is shown above.
The parameters that you can change are:
Lines: See Lines in the General particle system creation parameters list.
Total Particles: See Particles Per Second in the General particle system creation parameters list.
Yawvar: See Yaw Variation in the General particle system creation parameters list.
Pitchvar: See Pitch Variation in the General particle system creation parameters list.
Velocity: See Velocity in the General particle system creation parameters list.
Velvar: See Velocity Variation in the General particle system creation parameters list.
Particlevar: See Particle Number Variation in the General particle system creation parameters list.
Particlelife: See Particle Life in the General particle system creation parameters list.
Particlelifevar: See Particle Life Variation in the General particle system creation parameters list.
Particlesize: See Particle Size in the General particle system creation parameters list.
Begintime: This is the frame at which the particle system will begin to create particles. Note: If a negative number
is given to begintime, the particle system will be fully "formed" at frame 1.
Endtime: This is the frame at which the particle system will stop creating new particles. Note: After the endtime frame,
the particles that already exist will still exist. They will only disappear after they are dead. To make the particles ALL completely disappear
at a specific time, keyframe Maya's builtin visibility parameter for the particle system.
Scenes that include particles
The fireball, the pieces of smashed house, the tail of the missles, the dust cloud around Gertie, and the water splashes were all created using my particle system plugin.