Jump to content
mrWolf

DOP groups for rbd Packed Objects

Recommended Posts

I have a RBD sim, with 1 packed object which contains 9 elements.

I am trying to disable the gravity only on certain elements, within the packed object.

 

In order to achieve this, I would like to control the gravity node with a dop group.

 

I created a point attribute "falling" which I control in a sop solver, within the dop network.

Then I created a DOP Group that creates a group based on the following expression:

 

point($DOPNET+":"+$OBJID+"/Geometry",$OBJ,"falling",0)

 

post-1409-0-62246900-1427424243_thumb.pn

 

Now, this seems to work but ...not quite. 

I see elements that start fluctuating at a certain moment, but this moment doesn't match the moment when the "falling" attribute is triggered to 0.

 

To start, I'd like to understand if I am using the above expression correctly.

 

I am quite confused with the global variables $OBJID , $OBJ used with Packed Objects.

 

Could anyone shed some light on this?

 

I am on H13.0.547

Edited by mrWolf

Share this post


Link to post
Share on other sites
Check attached file. I add falling at SOP level but you can also do it in DOPs.

 

$OBJID isn't gonna work because rbdpacked object is just a single object. So it will be 0(depends on number of DOP objects) for all objects.

dop_group_on_rbd_packed.hip

Share this post


Link to post
Share on other sites

Check this thread:

POP forces and Bullet sim

 

hi Pradeep,

thank you for the example hip file, very much appreciated.

Your explanation makes sense and it works great !

 

I was trying to stay in the rbd land and use the old style way to drive rbd objects.

But I guess with rbd packed primitives , since we deal with points and transformation matrices opposed to real geometry, we are suddenly in a pop world instead !

 

I've read often here and there that it's possible to access the real geometry of a rbd packed primitive in a sop solver (meaning, unpack ... use and re-pack), but I wasn't able to accomplish this. Meaning that when I re-pack the element it's not the same as the one I unpacked (primintrinsic are lost when unpacking), so the sim breaks.

Is there a proper way to actually extract the packed data , within DOP, use it, and repack it seamlessly ?

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

×