Parameters

   1284   1   0
User Avatar
Member
6 posts
Joined: Dec. 2017
Offline
Hi
Can someone help me with this problem I have. When I adjust the height of the barrel I want the lid to
stay close to the surface of barrel.

Thanks
Edited by K-InSaNe-N - April 5, 2018 11:55:56

Attachments:
Height.jpg (88.7 KB)
Height1.jpg (92.7 KB)

User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Quite a few ways to do this from using trig to simulation. Definitely involves building a constraint if you want to automate this.

I prefer a wee bit of trig to do this.

You need to build a constraint rig.

I did this in SOPs using VOPs using a well placed circle tied to a pivot point on the lid using old school point() expressions.

Then use the Intersection Analysis SOP (Added in H16.0 and is an awesome SOP!) to return the hit point of the circle on the barrel.
Then build a simple line segment between the hit point and the origin.
Use that Line compared to a reference vector down the Z axis in my case to build an angle (See inside the Attribute VOP).

And finally another triplet of point() expressions to fetch the rotation attribute on the point to rotate the lid.

Scrub the first 24 frames to see how it updates to the deforming barrel.
Edited by old_school - April 6, 2018 19:17:56

Attachments:
barrel_lid_lean_dihedral_VOPs.hip (138.7 KB)

There's at least one school like the old school!
  • Quick Links