PDA

View Full Version : aligning SDF collision volumes


Chaindriver
06-23-2011, 05:32 PM
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!

SoLiTuDe
06-26-2011, 06:13 AM
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.

Chaindriver
06-26-2011, 01:56 PM
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.

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

SoLiTuDe
06-26-2011, 05:39 PM
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)

CGTalk Moderation
06-26-2011, 05:39 PM
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.