Breath Vapor Simulation in Maya

Page 2 of 3

I typically will lead her exhale by a few frames to give the rate of particle emission a chance to ramp up. For example, she is slightly exhaling between frames 6 and 17. I will set a keyframe of 0 on the rate of the emitter at frame 3 and a key of 100 at frame 10 and again a key of 0 at frame 15. This, along with my particle render type and lifetime (which I will get to briefly), will work nicely to give a small exhale look.

Another quick slug of whiskey, and I will continue this process; to spot when she is breathing out or speaking and keyframe my emitter’s rate accordingly, leading by a few frames and ending a few frames early. The bigger the exhale, the larger I set my rate. [an error occurred while processing this directive] Now, at this point, put your feet up and relax a moment. Rest your eyes, play some Tetris, get a new bottle of whiskey, whatever. This is a critical part of the Maya animation process, especially if you’re being paid hourly.

To get the directional emitter to emit to properly look like an exhale, I need to set a number of it’s attributes, before I go on to the look of the particles. I already have its directions set, and an animated rate that corresponds to the subject’s exhales.

Figure 3.
I shall proceed by setting a spread of 0.45. This will give me a nice 45-degree cone of emission for the particles. Not too thin, like a jet steam, not too wide like an explosion.

Next is my speed. Now here I typically will be content with a non-animated number. But if your subject is going from a trivial exhale to a barbaric yell, then you may want to animate the speed to correlate to the force with which the subject is exhaling. In this particular clip, the two women are strolling along the street casually talking about something, perhaps their inconsiderate boyfriends who always leave the toilet seat up in the bathroom. So, it’s not so important to me here to animate the speed. I have set mine to a constant of 2.0. I’ve also set the Speed Random to a value of 0.35 to slightly randomize the speeds of the individual particles. This gives the exhale a more natural movement and look. Figure 3.

Break for whiskey? Sure, and while you’re at it, look up “latex” on Ebay. Hello!

Figure 4.
Now it’s time to deal with the look of the particles. This will depend on a number of factors, and you’ll probably end up going back and forth between the attributes on the emitter and the attributes on the particle to fine-tune the shot.

The particle render type I prefer to use here is the Cloud (s/w). I like it for a few reasons. Namely, however, it is a software render particle type, and I prefer those to the hardware types overall. The other type of particle mostly used for this type of simulation is the sprite. While I widely use sprites in a number of particle applications, I prefer the cloud render type for this particular purpose. I think they look better easier and faster than sprites. Also, they have a good way of blending together via their threshold attribute and generally give a finer render than sprites.

True, they will render much slower than sprites, but I believe this is a limited enough application of the particles to warrant a slightly increased render time. Plus they remind me of cotton candy. Mmmmm, cotton candy.

First up, lifespan. This dictates how long the particle will “live” in the scene. Now with colder climates, you will see a more pronounced breath, but it will be short lived. In more moderate cold climates, you’ll see the breath for longer, but not as distinct. (In warm climates you won’t see it at all, silly.)

For the lifespan mode I have set it to lifespanPP only, to give me the ability to control the lifespan on a per particle level. Under the lifespanPP attribute, I set a creation expression to control how long the particles live. Figure 4.

Figure 5.
As a recap, a creation expression is a short bit of code that will affect a particle as soon as it is born and a runtime expression, other type of particle expressions, will affect the particle on every frame of the animation. Since I do not want the lifespanPP to change over time, a creation expression here is called for. I will right click on the lifespanPP attribute and select Creation Expression.

This will pop up the Expression editor. Figure 5.

In the text entry window, I will enter my expression and then hit the Create (or Edit if an expression already exists on this object) button to create it. This expression will not control the lifespan of each particle in this particle object.

My expression reads:
Anim_particleShape1.lifespanPP=rand(.9,1.6);

This expression will set the lifespan of each particle born to a random number between 0.9 and 1.6. By setting a randomness to the lifespan of each particle, we make the whole effect behave much more naturally.

Next up is the particle’s size, or radius. Again I prefer to have a per particle control over each particle’s size, so I have add a radiusPP attribute. I click on the General box under the Add Dynamic Attributes heading in the Attribute Editor with the particle object selected, click on the Particle tab, and select radiusPP. Figure 6.

Figure 6.
This will create an attribute for this particle object that will control the radius for each particle. On this attribute I will create both a creation and runtime expression.

The creation expression will give a random radius within a range to each particle as it is born. The runtime expression will allow each particle to grow in size the older it gets. This will help the breath dissipate into the cold air.

Once again, I will right click on the radiusPP attribute and select Creation Expression to open up the Expression Editor. In the editor I will type in an expression to create a random radius for each particle within the range of .05 and .2. The creation expression reads:
Anim_particleShape1.radiusPP=rand(.05,.2);



Prev 1 2 3 Next

Related sites:Animation ArtistDigital Animators
Related forums:

[an error occurred while processing this directive]