Jump to content

Trigger an animation


lulu01

Recommended Posts

Hey,

Can somebody please help me. I'm having this problem for a while now.
I believe its very simple, but my knowledge is still a bit limited and I can find the right information online, or in the Houdini guide.

So, I have a point moving and an animated sphere and I like trigger the animation of the sphere when the point moves through a Bounding Box.
How would I tell the sphere to animate when the point enters the bounding box? It needs to be some kind of on switch, for the sphere to animate.

 

 

Link to comment
Share on other sites

Hey Lulu01,

You can use attribute transfer node to activate the sphere . Make an attribute on the point and when it comes close to the sphere/bounding box , it will transfer the attribute value onto the sphere , and use that value to activate the animation .

 

A slightly more complex way to do this would be using sdf . Sdf volume has a positive value outside and a negative value inside . You can convert the sphere into a sdf volume using the isooffset node and use a volume sample to assign a value to the point inside an attributeVOP node .If you assign the value to cd(color) , you'll be able to see the color change when the point enters or exits the sdf volume . The point will have a positive value if it's outside the sphere and a negative value if inside . Now use this value to trigger something . 

Link to comment
Share on other sites

Hey ashwinsareen_3009, thx for the quick reply.
I understand what your saying, but I just don't understand how I can play the animation on demand.
I believe I need some sort of vex code or vop setup to trigger the animation, but I just know where to start looking for the right information.

If you or somebody else can find the time, I made a quick setup up. This is the last piece I need for a project, or everything will be for nothing.
A bit dramatic I konw, but it would be really nice if this can be solved.

 



 

 

TriggerAnimation.hip

Link to comment
Share on other sites

  • 10 months later...

Hey Chris good to see you here. In that situation what I've done in the past is use a solver, to in this instance, flip a value from 0 to 1 if this colour turns red. If this triggers you mark down the current time. Timeshift to the end of your timeframe, and transfer the "triggerTime" value to whatever you are doing. You now have the time at which your colour will change. Use that value as an offset to your alembic and it will know when to start playing. If you had a bgeo cache and thousands of points, you could use this to be able to know what offset all your animations would need to be on particles

Link to comment
Share on other sites

  • 2 years later...
On 2018/10/18 at 1:12 AM, TheDude said:

Hey Chris good to see you here. In that situation what I've done in the past is use a solver, to in this instance, flip a value from 0 to 1 if this colour turns red. If this triggers you mark down the current time. Timeshift to the end of your timeframe, and transfer the "triggerTime" value to whatever you are doing. You now have the time at which your colour will change. Use that value as an offset to your alembic and it will know when to start playing. If you had a bgeo cache and thousands of points, you could use this to be able to know what offset all your animations would need to be on particles

Hello, Can you share this hip file, it will very helpful

Link to comment
Share on other sites

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...