Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Line Step and Smooth Step

From: Maya Particle Effects

Video: Line Step and Smooth Step

In this movie we are going to talk about this smoothstep function, a very useful function. And sometimes you just want to stipulate more exactly where you want a particle to start increasing or stop increasing or opacity to start and stop changing. With smoothstep it gives you this option. Smoothstep is a built-in function. Maya basically enters the value between 0 and 1 over a specified range. So you will have a smoothstep and you will have a start and an end and a unit parameter. And the smoothstep basically means that you are going from 0 to 1 from the start to the end of whatever unit parameter you have picked. To make this simpler I am going to start and make some expressions for you to see.

Line Step and Smooth Step

In this movie we are going to talk about this smoothstep function, a very useful function. And sometimes you just want to stipulate more exactly where you want a particle to start increasing or stop increasing or opacity to start and stop changing. With smoothstep it gives you this option. Smoothstep is a built-in function. Maya basically enters the value between 0 and 1 over a specified range. So you will have a smoothstep and you will have a start and an end and a unit parameter. And the smoothstep basically means that you are going from 0 to 1 from the start to the end of whatever unit parameter you have picked. To make this simpler I am going to start and make some expressions for you to see.

So I am going to go to a Runtime Before Dynamics Expression for the Radius. And the first expression I am going to put in is I know that my Creation Expressions, I know I have my radius that's starting out at size 0.1. So I always want my particles to be at least size 0.1 for the Radius. So for this expression, what I am going to do is radius Shape1, copy it down here, equals 0.1 plus five times smoothstep. And I am going to have this start happening at frame 100, have it go to frame 500 and the unit parameter is frame. I am going to create this. No red down there. That means I did the right thing.

Okay, so essentially the particle is going to start out at 0.1 size radius and then I am going to go five times the smoothstep value, which will be going from 0 to 1 from frame 100. So the smoothstep value here will be 1 at frame 500 and it will be 0 at frame 100. So at frame 100 the particles will have a radius of 0.1 plus five times zero. And so they will have a radius of 0.1 and at frame 500 they will have a radius of 0.1 plus five times 1. So the biggest radius that these particles will get up to will be a radius of 5 plus 0.1.

Okay, so let's see what happens here. We can see that our particles start getting bigger. Go back and do that again and they are getting bigger and bigger. Let's make sure that I have this Animation Preferences. It's always important when you are working with particles to have the Playback Speed every frame. Save. And there they go again. And so let's do a little render of our particles. Let's see, there they are.

Now the next thing that I want to do is I want to change the opacity of these particles over time. So I am going to go into the Opacity Per Particle expression, a runtime expression. I am going to do equals 1 and I want their opacity to go down minus. So I want their opacity to decrease over a range of frames. I want the opacity to decrease from frame 100 to frame 400.

This is from the time our particle is born at frame 100. Or actually it's not. It's from frame 100 to frame 400 wherein the opacity of these particles is going to decrease, all of the particles, uniformly. I am going to edit that and it's telling me that I have a syntax error. We will add another bracket there and that should take care of that. Okay. So let's see what we have got going now. All right, so we are going to let ourselves get by to-- we said by frame 400, they should be completely transparent.

And look, there is nothing there at frame 400. Now I want to change that. I will go back a little bit. Let's show you that there is something there. For example at frame 200. Let's see what we got at frame 200. Look, we have some particles halfway transparent at frame 200. Okay, now I want the same thing to happen over the course of a particle's lifespan, not by frames, by Lifespan. So right now let's do a Runtime Before Dynamics Expression. I just want to see what my Lifespan is right now.

Let's see. Creation Expression of my Lifespan actually. I am going to change that from 300 to 40 so it will be easier to see. And I am going to edit that. Then I am going to go into Opacity Per Particle, Runtime Before Dynamics Expression and I am going to make 1 - smoothstep, change what that is there. I am going to make it the lifespan so I am going to go particleShape1.lifespanPP.

Then I am going to put age there. Going to get rid of the word frame. I want it to start at 0, the beginning of the particle's life, and I am going to edit this. So now I have something different. So essentially it's going to decrease over the particle's age. Going to go Edit. Now I will show you something fun. That is I have the word age there and let me open up that again. You will notice how it's filled in. In front of age, it's filled in for me, particleShape1. Cute. Okay, so let's run it. Let's go.

Now this is going to be a per particle attribute based on when the particle is born and when it dies. So some of the particles will be transparent and some of them won't. Well, they're so big that they are taking up the whole frame. Let's move back a bit and try that out here. See what we get this way. Hopefully we are going to see some difference. Okay, so you see that some of the particles are opaque and some of them are more transparent because this, since I have done it over a lifespan, it's calculating each particle's lifespan and during the particle's lifespan it's going from opaque, from 1 down to 0. So how much fun did we have with this smoothstep function? Hopefully a lot of fun and we will continue ever onwards.

Show transcript

This video is part of

Image for Maya Particle Effects
Maya Particle Effects

26 video lessons · 6864 viewers

Audri Phillips
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
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.


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 "Already a member? Log in

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

Your file was successfully uploaded.

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.