Jump to content

issue with piston animation with chop and constraints


FR3D

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
Link to comment
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
Link to comment
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
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...