Jump to content

How to rotate constraints


dxhhx

Recommended Posts

Hopefully this clip explains the problem:

ezgif.com-gif-maker(3).gif.556719ae415ae6687f99447aa7c274c2.gif

2 packed geos are hard constrained together, tube animation (translate and rotate) is transferred from SOPs. The constraint works for position but rotation, how to make sure the constraint network understands there is rotation?

Desired behaviour:

ezgif.com-gif-maker(2).gif.6dec462e30504d42ea3d5f9d235e7c4a.gif

Scene file:

001.hip

 

 

desired.webm

current.webm

Edited by dxhhx
Link to comment
Share on other sites

001a just turns off your Geometry wrangle and switches the object to animated static which allows the Dopnet to update the geometry orientation and in turn the constraint.

001c adjusts only your Geometry wrangle to also update the orient attribute so that the constraint can 'see' the rotation.

Not sure on the ins and outs of why these should 'work' but they seem to do what you want. Maybe?
J

001a.hipnc

001c.hipnc

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

So one follow-up question: the constraint drifts in time, I've made the constraint longer to make it more obvious (desired behavior the link points and anchors are collinear):

ice_video_20211024-133952_edit_0.thumb.gif.05de019553f07a227bdf920b37acde3d.gif

Increasing the "Error Reduction Parameter" inside the Hard Constraint Relationship node makes it better but it's not perfect

Is there some other setting that would fix this?

002.hip

 

 

Edited by dxhhx
Link to comment
Share on other sites

I'm honestly not entirely sure why the hard constraint isn't enforcing rotation well enough, but the cheap workaround would be to use a Glue Constraint Relationship instead. Set s@constraint_type to "glue" with a f@strength of -1, then use a Glue Constraint Relationship DOP in place of your Hard Constraint. This will force both objects to solve as a single physical object.

You also don't need multiple DOP objects for this system to work. As long as you set the i@active and i@animated attributes correctly on your static and active pieces, you can solve everything as a single DOP object and simplify things a little.

002_toadstorm.hip

  • Like 1
Link to comment
Share on other sites

Hey Henry!

Just saw this. I was trying stuff earlier and found if I use 2 constraints, one "position" type and another "rotation", it works a lot better than using just one set to "all". Very bizarre:

 

ice_video_20211024-192407_edit_0.thumb.gif.39670952f1859b2941336efe25f84c14.gif

 

I'm going to check your file out now

Link to comment
Share on other sites

3 hours ago, toadstorm said:

I'm honestly not entirely sure why the hard constraint isn't enforcing rotation well enough, but the cheap workaround would be to use a Glue Constraint Relationship instead. Set s@constraint_type to "glue" with a f@strength of -1, then use a Glue Constraint Relationship DOP in place of your Hard Constraint. This will force both objects to solve as a single physical object.

You also don't need multiple DOP objects for this system to work. As long as you set the i@active and i@animated attributes correctly on your static and active pieces, you can solve everything as a single DOP object and simplify things a little.

002_toadstorm.hip

Yep glue works great. interesting.

Thanks Henry :)

Link to comment
Share on other sites

1 hour ago, dxhhx said:

Hey Henry!

Just saw this. I was trying stuff earlier and found if I use 2 constraints, one "position" type and another "rotation", it works a lot better than using just one set to "all". Very bizarre:

 

ice_video_20211024-192407_edit_0.thumb.gif.39670952f1859b2941336efe25f84c14.gif

 

I'm going to check your file out now

There must be a good reason why this works, but hell if I know what it is. Nice find!

Edited by toadstorm
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...