Jump to content
StarfishRap

Bake SDF for collision

Recommended Posts

Hello everyone,

Could someone share how does one go about baking SDF for collision geometry?

  • Do you go into your RBD object, under collision tab to file out the sdf?
  • And what format should be use to bake out the SDF? .bgeo.gz? .sim?
  • Could you bake out sdf in sop level and file in, in Dops level?

What about collision for Particles?

  • What's the workflow for setting up SDF for collisions for particles?
  • Could you do it in Popnetwork or is popsolver in DOPS a must?

Thanks!

post-6426-133835009724_thumb.jpg

bakeSDF.hipnc

Share this post


Link to post
Share on other sites

Change the File Mode to "Write" or "Automatic", then just tell it where to write out:

$HIP/../sim/collision.$F.sim

If you have it on "Automatic", you've already written out a file sequence, then you change something, it's not going to update. You either have to change the sequence name (version up) or set the file mode to "Write" to get it to update...

Share this post


Link to post
Share on other sites

[*]Do you go into your RBD object, under collision tab to file out the sdf?

Yes that is one way. You can cache out the .simdata geometry collision data out of the DOP simulation as it runs.

[*]And what format should be use to bake out the SDF? .bgeo.gz? .sim?

The extension should be set to .simdata.

[*]Could you bake out sdf in sop level and file in, in Dops level?

You can use the Iso Offset SOP to bake out collision .simdata directly but only with this SOP. Set the Iso Offset SOP to build an sdf volume then go to the File tab and this is where you set up the writing of the collision .sdfdata files that can be used as the collision sdf volumes for an RBD object.

What about collision for Particles?

[*]What's the workflow for setting up SDF for collisions for particles?

[*]Could you do it in Popnetwork or is popsolver in DOPS a must?

Set up your particles up in DOPs and then add passive RBD objects sourcing in your collision sdf .simdata collision volumes. You get the collisions set up for you if you leave the POP Solver volume collision settings at their defaults.

  • Like 1

Share this post


Link to post
Share on other sites

The limitations of these methods though is that there is (as far as I know) no ROP-based way to write out .simdata, it relies on you playing through the frame range live. This is slightly annyoing but it is also limiting if you are normally able to cache your geomoetry on a farm.

My preferred method is to write out SDF's from SOPs as a bgeo, read it back in with a file and then reference it as a proxy volume, you just need to use an expression to grab the resolution off the cached volume.

The additional benefit of this is your cached SDF is ready to be used in POPs if you have a SDF collision node setup. It's kind of a roll-your-own thing as SESI doesn't provide one, but I bet you can find one floating around these forums.

post-2992-133842322129_thumb.png

Share this post


Link to post
Share on other sites

Thanks for the replies

The workflow suggested by tjeeds sounds interesting.

But it still isn't able to rop out .simdata right?

or is it not needed as you've already set proxy volume?

Gonna test it out when I could.

Thanks for sharing!

Share this post


Link to post
Share on other sites

The extension should be set to .simdata.

You can use the Iso Offset SOP to bake out collision .simdata directly but only with this SOP. Set the Iso Offset SOP to build an sdf volume then go to the File tab and this is where you set up the writing of the collision .sdfdata files that can be used as the collision sdf volumes for an RBD object.

What's the difference between a .bgeo and .simdata or .sdfdata? Is it just for visual organization sake? or is there an actual difference in the file formats?

Edited by Solitude

Share this post


Link to post
Share on other sites

The .bgeo and the .simdata files are different enough to make it annoying, yes. You just can't rename a single sdf volume .bgeo file to .simdata and have it work as a collision volumes on your RBD Object DOPs.

Try the method Tjeeds recommends to use .bgeo's that contain single sdf volumes in DOPs will work as well, but as he said you need to represent the resolution correctly in order for this to work.

  • Like 1

Share this post


Link to post
Share on other sites

The .bgeo and the .simdata files are different enough to make it annoying, yes. You just can't rename a single sdf volume .bgeo file to .simdata and have it work as a collision volumes on your RBD Object DOPs.

Try the method Tjeeds recommends to use .bgeo's that contain single sdf volumes in DOPs will work as well, but as he said you need to represent the resolution correctly in order for this to work.

The workflow we often use is creating the sdfs with isooffset save as bgeo using a rop geometry and then load it using a file node -- and use that file node as a proxy volume in dops. Is there any real advantage to using .simdata over bgeo for collision volumes?

Share this post


Link to post
Share on other sites

Two years later and this is still the only way to bake out collision volumes?

 

:(

Share this post


Link to post
Share on other sites

I would also be interested if this workflow is still accurate ?

we still can't ROP a .simdata in SOP ? 

Share this post


Link to post
Share on other sites

Yeah the static object using the volume sample bgeos (or live) from SOPs is the way to go.  There's a SOP called the "collision source" that sets everything up to use in a static object DOP (collision SDF, and geometry point velocities if it's a deforming collider).  You just need to use the @name syntax in the prim group parameter of the static object for both the SOP path and the volume sample path.  There's a shelf tool that set everything up for you.  Check this hip

staticcollide.hipnc

  • Like 1

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

×