Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
Elena_ DeCosta

Start keyframe animation on every particle event in maya

hello friend

I should ask this in maya forum but i am little unaware of maya background, anyway

i am little new in maya, probably this solution can be easily possible in houdini. i have an scaling keyframe animation in sphere and it is instance with particles. Now i need to trigger sphere animation on particle event, mean every time when particle collide with plain the event will occur sphere animation


I tried with event editor but every time animation is playing same in every instances , is there is any way to start sphere animation with every event from the begining.

I WILL GREAT FULL , IF ANYONE COULD HELP

Edited by Elena_ DeCosta

Share this post


Link to post
Share on other sites

Maya's particle instancer is a bit ancient, but you can do this.
 
The limitation here is that you can't use keyframed animation; the instancer can, like its name implies, only instance a node or nodes, so the keyframe animation would be identical on all instances.
 
What you'll need to do is:

  • figure out how many frames of animation you need (let's say you have 10 frames of animation)
  • for every frame, duplicate the sphere
  • add all these spheres to your instancer node, note how they are ordered, this is important
  • add an 'indexPP' per-particle float attribute to your particle
  • on the particleShape, under the instancer options, set 'index' to 'indexPP'

Now you can control which instance is shown via the indexPP attribute.
 
Your task now is to animate this indexPP attribute when the particle hits something. Create a per-particle runtime expression on your particles like this:

if( event && indexPP < 10 ) {
    indexPP++;
}

Adding an 'event' attribute allows the particle to know when it's collided with something. As long as it's 0, the particle hasn't collided with anything.
 
See attached file.

instance_sphere_anim.ma

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0