Jump to content

Updating RBD constraints from deforming geometry


toadstorm

Recommended Posts

I have a tricky problem with RBD constraints that I can't quite figure out.

I'm generating hard constraints connecting some packed RBDs to deforming geometry. I can use a SOP Solver to update the @P of the constraint point that's attached to the geometry as it deforms, but I'm not sure of the correct way to update the orientation… I don't what space to transform the constraints into and out of. Simply updating the orientation of those anchor points to match the deforming geometry doesn't work.

I'm attaching a test scene to demonstrate the problem.

 

 

constrain_to_animated_anchors_not_working.hip

Link to comment
Share on other sites

I understand how matrices work... my question is more about what "space" RBD constraints expect to operate in. They don't seem to work in world space... it's like there's some kind of local or rest space they exist in that isn't explained anywhere.

Link to comment
Share on other sites

Hi Henry, been wondering the same thing. Can't really help you with your scene but I do have a testbed scene where I've been trying (and failing) to understand the relationship of the orientations of the constraint points. Without any documentation it empirically looks like the world anchor and the position anchor have a pseudo 'child/parent' relationship but with the weird twist that the 'child' seems to have its orientation inverted relative to the 'parent'. I don't think I can explain this very well and I may well be barking up the wrong tree but the attached scene gives a few examples of how the two constraints might be related. (At least in terms of orientations but perhaps only for world to point pins). Needs a lot more testing. Feels like the Y axis of each constraint point's orientation is pointed towards the alternate constraint point along the tangent of the polyline. I'm sure it would be a different scenario with non-world space anchors as well.

anchors and orientations.hipnc

soft.gif

  • Like 1
Link to comment
Share on other sites

ok, I don't understand how things work under the hood...but here's what I found with a bit of prodding...

Believe it or not, if you INCREASE the scatter...say 200....IT WORKS !!! The lower the count, the more chance there would be strays that get left behind. What the fook is going on ?

 

Aha, gotcha ! So now if you DECREASE the count to say as low as 20.....there would be strays that get left behind. now go into to DOP, increase Sleeping time to 10..voila......all get moving again...

(there's still the mystery of why higher count works even with the default Sleeping time at 2...:blink:)

Edited by Noobini
Link to comment
Share on other sites

Just a small followup to the constraint orientations thing. It looks like the orientations of both points of the polyline are co-dependent(!). You rotate one and it rotates the other so any tricks involving animating the constraint orientation can only really work if you only rotate one of the points otherwise they just 'fight'. That said, the attached scene shows rotating only a single point per constraint working for rotations about Y and Z but it looks like X rotations are possibly bugged (there was a similar bug a year or so ago) where the rotation is doubled up on the non-animated point....

visualise.gif.gif

anchors_orientation_bug.hipnc

Link to comment
Share on other sites

Using the fact that you can only really rotate one of the anchors per constraint polyline here's the pighead with just hard constraints rotated to look at the world space anchor. Can't quite work out how to get the initial orientations to flow through to the start of the sim yet.

anchors and orientations_odforce4.hipnc

soft.gif

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...