Jump to content
Sign in to follow this  
FR3D

issue with piston animation with chop and constraints

Recommended Posts

I am trying to animate an engine using chops and constraints.

I manage to get something quiet close but it isn't accurate(cheat)

My main issue is that i cannot find how to use a "look at" in conjunction with some restriction to force the tip of the arm to slide along the Y axis.

I tried many other solution as well as trigonometry(which i am not very good at) which i gave up on.

i also tried with bones but again my knowledge is close to none in houdini and i wasn't able to restrict bones

 

I wish to achieve the real thing with your help

 

Thank you

piston.hip

Edited by FR3D

Share this post


Link to post
Share on other sites

Ok, i managed to get the trigonometry formula.

Now i have two method.

one is Hscript which works perfectly(u can check the measure sop) and the other one is VEX.

For some reason the Vex(into a point wrangle)works but is speed up.I am pretty sure it is the same script.

Does the wrangle node manage "@frame" differently than "$FF" in hscript?

piston trigonometry.hip

Edited by FR3D

Share this post


Link to post
Share on other sites

nope no difference between $FF and @Frame (when bound to float attrib).

the reason your file isnt working correctly is because in VEX for cos/sin you have to provide the value in Radians. Apparently hscript is fine with Degrees.

here you go: @P.y =  @r*cos(radians(@a))+sqrt(pow(@l,2)-pow(@r*sin(radians(@a)),2)); 

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, 3dome said:

@P.y =  @r*cos(radians(@a))+sqrt(pow(@l,2)-pow(@r*sin(radians(@a)),2));

Thank you 3dome.

I will clean my file, and share it in the days coming.

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  

×