Jump to content
toadstorm

Updating RBD constraints from deforming geometry

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

Share this post


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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks! This is helpful... I'm going to do a little more testing on my own and report back here once I have a clearer idea of what's going on.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

had another thought....the reason it works with higher scatter count is...because of many/dense neighbours...they jostle each other and cause them to 'wake' up.....

Does that sound reasonable, gurus ?

Share this post


Link to post
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

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

×