18 October 2010

Hidden Particle Attributes

So I want to tell you about some particle attributes that you may not know existed. Maya's help docs are lacking in this area. If you want to add a Per Particle Attr, you can look at the built in particle Attrs, like radius. You'll notice some collision attribute, but if you search for them in the documentation you won't find them. It's like autodesk forgot to mention them. Which so irritating since they are so useful. But I'd like to tell you about something that is even more secret. There are 2 attributes that don't appear on this list or in the docs. They are "ageNormalized" and "event". These two are special because not only are they undocumented; they don't even show up in a default particle! You have to force maya to create these attributes for you. So I'll tell what they do and how to make them.

First is ageNormalized. Most of you use this guy without knowing it, but you probably don't script him. Everytime you create a ramp and map it to age Maya actually creates and adds it to the ageNormalized attribute. This attribute shows how long a given particle will live in values between 0 and 1. A normalized age. It's useful any time you want to change something based on age. Like say radius.

The 2nd one is event. This one tells you how many times a particle has collided. So you can use it as a collision counter. You can use this to trigger expressions at specific collisions. To set it up you have to go in the particle menu and create a particle event. Then go ahead and delete the event. Now you have an "event" attribute.

No comments:

Post a Comment