New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

Maya Particle Effects
Illustration by John Hersey

Changing particle life spans with expressions


From:

Maya Particle Effects

with Audri Phillips

Video: Changing particle life spans with expressions

In this section we'll be dealing a lot with Lifespan expressions, but to best show that I am going to set up an emitter and put some colors on the particles as well. So the first thing we're going to do is under Particles, we are going to create an emitter. And I am going to make a Directional emitter. I am going to call it part. Under Distance/Direction Attributes, I am going to give it a Direction of X and I am going to give it a bit of a Spread so that they don't go in a straight line, they are little spread out. Let's see if that's enough. You want to go Apply. I am going to make my scene about 600 frames long. Here is my emitter sitting right in the center.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Maya Particle Effects
2h 8m Intermediate Jun 11, 2009

Viewers: in countries Watching now:

Particle effects can be used to create everything from realistic smoke and light to abstract design elements. In Maya Particle Effects, Audri Phillips demonstrates the particles she has found helpful in her work creating dynamic visuals for video games,film and fine art. This course goes deeper than the basics, tackling topics like saving time by reusing MEL expressions, implementing physics to create realistic effects, and manipulating paint effects to give particles the look and feel of an envisioned design. Exercise files accompany the course.

Topics include:
  • Working with particle emitters and fields
  • Instancing paint effects and geometry to particles
  • Using Maya particles to produce graphic design elements
  • Using the relationship editor, creating particle collisions and collision events
  • Creating realistic effects such as smoke by emulating real life physics
  • Rendering and exporting final projects
Subjects:
3D + Animation Particles Visual Effects
Software:
Maya
Author:
Audri Phillips

Changing particle life spans with expressions

In this section we'll be dealing a lot with Lifespan expressions, but to best show that I am going to set up an emitter and put some colors on the particles as well. So the first thing we're going to do is under Particles, we are going to create an emitter. And I am going to make a Directional emitter. I am going to call it part. Under Distance/Direction Attributes, I am going to give it a Direction of X and I am going to give it a bit of a Spread so that they don't go in a straight line, they are little spread out. Let's see if that's enough. You want to go Apply. I am going to make my scene about 600 frames long. Here is my emitter sitting right in the center.

Let's go and there are the particles coming out along the X-axis because that's the direction, the X-axis. I am going to go into the particleShape node, into the Attribute Editor of it. And I am going to change the Particle Type to Clouds, particleShape1 from Points to Clouds. And that's a bit of a big radius, so I hit the button that says Current Render Type right under the Render Attributes, Particle Render Type and I am going to add just kind of an overall Radius, for all of the particles I will make them around about .3. That looks kind of okay to start.

The next thing I am going to do is I want to disassociate the color from the shader ball. So I am going to open up my Hypershade, bring it up, make a new particleCloud, assign it to the particles, click on it. Under Color, I am going to hit the Map button, then go up to the Utilities again. And I am going to go under Particle Utilities, I am going to hit the Particle Sampler button and once again the color is now disassociated from the shader ball.

And the particle color will be ruled by the color expression, which I don't have yet. So I am going to hit the Color button and we are going to add a Per Particle Attribute. Add Attribute. I am going click right in here. This time I am going to not make an expression. I am just going to create a ramp. Now I am going to edit that ramp and you are going to see that this is where Lifespan comes into play for a ramp and for the color on a ramp. When a particle is born, it's start at the bottom of the ramp and as it lives it travels up through the top of the ramp. So for a particle's life when it's first born in this ramp it would be red and then as it lives it will be blue for the duration.

Now if all the particles live the same amount of time, they will all look similar as they travel up through there. So I am going to go once again back into the particleShape1 there. And I am going to also show you that there is a Lifespan Attribute right up here. Right now the Lifespan Mode is Constant and the Lifespan says its 1. Basically each particle is only going to be living for 1 second or 24 frames. So Lifespan 1 means 24 frames. If I made it Lifespan 10 right now, Constant, then all the frames will be living the same amount. They'll all be living for 240 frames before they die off. And you can see them dying off after 240 frames.

And so let's see what the color looks like now. And you can see the particles start out just red as they are born and as a particle ages it goes and turns into blue because that's how our ramp is set up from Red to Green to Blue. Let's go back into our ramp. Let's edit the ramp, make it slightly more interesting. Let's start them out maybe as more of a yellow hot, make them closer to black. And then kind of in the middle, we'll make them red a little bit like that. So it's kind of a little bit more of a fiery look to these things as they go.

And you can see what will happen there. I am going to add in one blue stripe in the middle of this just so we can have something to look at that will help us see what's happening. Put a little blue right in there, which is weird but... Okay. And there is that blue stripe for the particle color. Now the next thing we want to do once again is I want to go into the Attribute Editor of the particles and I want to instead, I want to put an expression here because I don't want all the particles to live the same amount of time.

I want them to vary how long they are going to live. But one of the first things I have to do for that is I have to change the Lifespan Mode from Constant to lifespanPP. Then I have to go down here and in the Lifespan PP I have to put an expression. I am just going to put in a Creation Expression. And I take that, Ctrl+C, add it here, Ctrl+V. And let's make the particles equals a random expression, 1 and 12. And let's see what that looks like.

So this would mean that the particles are going to live anywhere between 1, which would be 24 frames, and 12, which would 12 times 24 frames. So let's say we'll do a little fast render of this, get them going for a while and see what that looks like. And you can see that the particle color is starting to be mixed up because different particles are living different amounts of time. So they are going through their lifespan faster. Let's go and change the ramp even more, so it's even more apparent when we are talking about that. So I am going to put a little something here, a little green maybe right there. Oh! She is pushing the wrong thing, right here, like that green. And then make it really obvious, I am going to put something there.

I am going to make that purple and then I will make that purple. Let's see what happens. I am really hopeful the colors will be more mixed up now. So you can see how varied and mixed up the colors are because they are going through their lives. They go up this whole ramp till their changing. And it can be kind of fun but obviously if I was going to make some kind of fire effect or kind of an emission effect, I wouldn't want the randomness to be that great, because I would want things when they came out of a rocket ship at the back to start out one color and kind of all kind progress to another colors they went to the end of it.

So that's a fast look of what you can do with Lifespan expressions and hopefully you can use this as a template. And you can start playing around on your own with it.

There are currently no FAQs about Maya Particle Effects.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Maya Particle Effects.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Notes cannot be added for locked videos.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.