Jump to content

Start keyframe animation on every particle event in maya


Recommended Posts

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
Link to comment
Share on other sites

  • 2 months later...

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

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...