PDA

View Full Version : Help,please!


Jeep Wang
03-12-2004, 08:16 AM
Is there any way to get and set particle's Attributes in maya api, just as acceleration,velocity...?

playmesumch00ns
03-12-2004, 04:38 PM
not as far as I know. The "official" way to do it is with a field. So you have to work out the force you need to apply to get th edesired effect

gga
03-12-2004, 06:00 PM
maya5.0 has MFnParticleSystem for getting all the standard attributes.
Setting them directly is another matter. It is possible, but not documented anywhere and doing so has some gotchas (kind of one of those trade secrets of the biz, I guess). If you are familiar with the maya api, you can likely guess how to do it.

Jeep Wang
03-14-2004, 02:28 AM
Thanks very much! I will try.But I considered MFnParticleSystem is only for render,can I get acceleration or velocity by using MFnParticleSystem?

playmesumch00ns
03-15-2004, 09:29 AM
Says in the manual it's meant to be used by the renderer, but that doesn't mean you can't use it any other time.

Presumably though for setting them you could just get a dag path to the particles, then get the array attributes for velocity, acceleration etc, then set them directly.

gga
03-15-2004, 06:42 PM
Originally posted by playmesumch00ns

Presumably though for setting them you could just get a dag path to the particles, then get the array attributes for velocity, acceleration etc, then set them directly.

Correct. See what I mean that anyone familiar enough with the api can figure it out? Of course, sometimes a solution is more pain than it's worth.

As particles are interpreted in a different loop from the rest of the scene, there is potential for conflict and you will have to watch out for a likely lag of one (sub)frame. It kind of works, thou. But if you add collision objects, you will be asking for even more trouble.

There is also another way, which is a tad safer, by using particle expressions, too, but requires much more setup on a per scene and particle bucket basis.

Jeep Wang
03-16-2004, 12:06 PM
You are right,i had it done ,thanks very much!
:beer: :bounce:

CGTalk Moderation
01-17-2006, 05:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.