aligning SDF collision volumes

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  06 June 2011
aligning SDF collision volumes

Hi,

I have a question regarding the SDF collision volume that are created for rigid bodies. It looks like the SDF volume is always aligned to the world XYZ axes, so if I have a thin object that is not aligned to the world axes, the SDF volume won't get generated properly for certain parts of the object. I could increase the resolution and play around with the Sign Sweep Threshold etc, but what I would really like is for the volume to be generated nicely according to the objects orientation.

Is there any way to ask the SDF volume to be generated in object space, so that the the object is aligned to the XYZ axes and the volume can be generated properly?

I tried writing out the collision volume (one of the options in the RBD object node): I aligned the object to the world XYZ axes, let the RBD node calculate the SDF volume, changed the File Mode to Write so that it's written out to disk, changed the File Mode to Read, then rotated the object so that it's not aligned to the world XYZ axes. It doesn't work. The collision volume is still aligned to the world XYZ axes...

Any help/tips would be greatly appreciated, thanks!
 
  06 June 2011
Originally Posted by Chaindriver: I tried writing out the collision volume (one of the options in the RBD object node): I aligned the object to the world XYZ axes, let the RBD node calculate the SDF volume, changed the File Mode to Write so that it's written out to disk, changed the File Mode to Read, then rotated the object so that it's not aligned to the world XYZ axes. It doesn't work. The collision volume is still aligned to the world XYZ axes...


You should be able to do it in sops instead, using an isooffset node (set to sdf). You can tell dops to refer to that node instead of calculating it's own using the volume sample option and picking a proxy volume. So basically rotate it, isoffset it, rotate the isooffset back. Also the isooffset has the benefit of being able to use the longest axis for more optimized divisions, whereas the one in the rbd object you'd have to figure it the best dimensions yourself.
__________________
http://www.fx-td.com
 
  06 June 2011
Thanks for the reply SoLiTuDe. I tried using the IsoOffset node as you have mentioned and I managed to use that as an alternative SDF collision volume.

Originally Posted by SoLiTuDe: So basically rotate it, isoffset it, rotate the isooffset back

However, I'm not sure how to do what you have mentioned above. I think you mean to rotate the Geometry node, and then in the SOP level: box1 -> isooffset1 -> xform1, where xform1 reverses the rotation. Is that right? But in doing this, the collision volume will not be aligned with my object...
 
  06 June 2011
Originally Posted by Chaindriver: Thanks for the reply SoLiTuDe. I tried using the IsoOffset node as you have mentioned and I managed to use that as an alternative SDF collision volume.


However, I'm not sure how to do what you have mentioned above. I think you mean to rotate the Geometry node, and then in the SOP level: box1 -> isooffset1 -> xform1, where xform1 reverses the rotation. Is that right? But in doing this, the collision volume will not be aligned with my object...



Ahh... I meant in sops. box1 -> xform (rotate where you want) -> isooffset -> xform1 (rotate back)
__________________
http://www.fx-td.com
 
  06 June 2011
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:12 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.