PDA

View Full Version : Particle Rotation... HELP!


Mumf
04-24-2002, 10:21 PM
I have a directional emitter that is emitting points. I instanced a bullet shell mesh to the points to simulate bullet shells getting ejected from a machine gun.

Everything works, but it doesn't look very realistic because I don't know how to set a per particle rotation on the shells.

I want every shell to have a unique rotation. Kind of a slow spin out of the chamber of the gun.

Also, when the gun turns, I need to turn the original bullet shell that is being instanced to keep the instanced shells emitting with the right orientation. This is simple... I can just parent it to the gun. But when you turn (rotate) the original geometry, every particle turns with it. Even particles that emitted a long time ago. Is it possible to have an emission where every particle emits using the information of the main (instanced) particle, but then goes about its own thing, after it has been emitted, forgetting about all the orientation and rotation of it's parent/creator?

Or is there a better way to emit bullet shells without instancing them to points?

I hope these questions are at least somewhat understandable.

Thanks,

:airguitar

Mumf

Lyr
04-24-2002, 11:21 PM
I think you are going to need a dynamic expression for that. Wish I could help but particles is one part of Maya I really don't know that well.

Mumf
04-24-2002, 11:25 PM
Yeah. I was afraid if that. Hopefully someone can proove us otherwise, but we'll see.

Thanks,

Mumf

:bounce:

noxy
04-25-2002, 09:10 PM
the way to do this is through custom attributes in the instancer.
most of this is handled with runtime expressions in the particle.
Make a custom PP attribute called rotPP (or whatever) and make a runtime expression such as
particleShape1.rotPP = <<0,2,0>>;
this will make each particle rotate 2 degrees in Y every frame.
you can add multipliers such as
creationrule:
seed = 10 (guarantees repeatable sequences)
myRand = rand (0,5); (this is another custom PP attribute)
runtimerule:
particleShape1.rotPP = <<0,2 *myRand ,0>>;
This will make all the particles rotate at different speeds.
From there you can set rules like making the particles stop rotating if they collide with the floor.
Don't forget to choose your rotPP attribute as the rotation controller for the instancer.

Hope this helps

Noxy

Mumf
04-25-2002, 10:10 PM
Great, thanks!

I'm going to try it out. I'm not too familiar with custom attributes and expressions. But, hey, now's the time to learn!

If I can get your expressions to work, they should do exactly what I was hoping. I'll give an update once I get it going.

Thanks,

Mumf

CGTalk Moderation
01-13-2006, 04:00 AM
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.