Jump to content
dfmn

Move Points

Recommended Posts

I'm trying to figure out how to move lets say point0 90% in Y towards point 1. When it moved 90% then move both point0 and point1 90% in Y to point2.

What im trying to create is theater curtains and I gotten pretty far, but I want to make a lil better.

I drew a picture which might make it easier to understand. You can also check out the file what I got so far, of course I would need to have better settings etc.

 

Any idea highly appreciated!

 

movepoints.png

curtain_test_002.hiplc

Edited by dfmn

Share this post


Link to post
Share on other sites

curtain_constraint.gif

For vertical line with several points it is as simple as:

// Point wrangle.
@P.y += max(0, @Time - @P.y) + @ptnum / 10.0;

Ask, if you will have problems with actual, more complex setup.

curtain_constraint.hipnc

  • Like 6

Share this post


Link to post
Share on other sites
48 minutes ago, f1480187 said:

curtain_constraint.gif

For vertical line with several points it is as simple as:


// Point wrangle.
@P.y += max(0, @Time - @P.y) + @ptnum / 10.0;

Ask, if you will have problems with actual, more complex setup.

curtain_constraint.hipnc

wow thats amazing! Thanks!

Share this post


Link to post
Share on other sites

@f1480187 is it possible to give each point a little delay before they start moving again? something like this:

 

pointmove.gif

 

I can just do it by hand, but I also trying to learn get better at houdini so this is very good learning for me!

Edited by dfmn

Share this post


Link to post
Share on other sites

curtain_constraint_ramped.gif

Sure, it is easy with a ramp. Input geo here must have a point per meter of height, to match with seconds of @Time variable. You also could multiply @Time by desired meters per second value.

// Point wrangle.
float timeramp = floor(@Time) + chramp("timeramp", frac(@Time));
@P.y += max(0, timeramp - @P.y) + @ptnum/10.0;

 

curtain_constraint_ramped.hipnc

Edited by f1480187
  • Like 6

Share this post


Link to post
Share on other sites

@f1480187 wow!... Thank you so much sir, this is amazing. Gonna try to recreate it in vops so I can understand how it works!

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

×