Jump to content

What's the best way to cache simulation data to disk?


magneto

Recommended Posts

Hi,

Everyone seems to use a different method. These are some of the operators I have seen people use to cache their simulation to disk:

DOP I/O

File

File Cache

ROP Output Driver

I am leaning towards DOP I/O SOP because it has both the capability to import DOP data which you always need to do I think and also the ability to read/write to disk.

What do you use and recommend using?

Thanks :)

Link to comment
Share on other sites

I think DOP I/O and File Cache are made for ease of use, they still contain ROP Output Driver SOP and File SOP inside

I would use File Cache SOP for generic caching of any geometry, but if you directly want to cache data from DOP sim, then DOP I/O may be handy, but you can still use Dop Import Fields SOP + File Cache SOP combo for that

  • Like 1
Link to comment
Share on other sites

I generally use DOP I/O with DOP-stuff, and File Cache for anything else - mainly because it's easy to just hit "Render", and then tick "Load from disk". If I'm not going to use the written files at the same place though, I tend to swap the File Cache for a ROP Output and read that in somewhere else with File.

  • Like 2
Link to comment
Share on other sites

What about loading from disk using DOP I/O or File Cache and then loading them somewhere else in another subnet using Object Merge? Is that nonsensical?

I do that all the time, usually putting a null under the cache and labeling it in such a way that I know it's the cache, untouched. For a pyro sim, for instance, I might use the dop i/o to cache it, put a null under it called "OUT_pyroCache" or something useful and then call that into another object to emit particles from that sim, or use the velocity field, etc. After the null I might do things like delete the extra fields I won't use for rendering, and maybe use a volume ramp or volume vops to prep the sim for rendering, then put a null under that called "OUT_render". This way you have one place to save and fetch the sim from, and it can also be the same node you are rendering. If you use a file node in other objects, you have no 'good' way of knowing where you're getting this data that's feeding your secondary sim. I think it makes more sense than having many file sops (and then possibly re-reading another copy of the geo from disk again).

I use dop i/o and file cache (makes directories for you, and takes care of saving and loading in one place) for home use (each studio tends to have their own version of file cache that they use to put things in the right places) -- then I'll use fetch nodes pointing to the rops inside of those otls in /out if I need to chain anything together.

Edited by Solitude
Link to comment
Share on other sites

Thanks Solitude, that's awesome. So you fetch the cached sim from say OUT_pyroCache using Object Merge? Now that you said it, having a single place to save/load the cache for something make sense.

I also have a hard time finding good names for the objects. For example the cache subnet, do you name it fluid_cache, or cache_fluid? I haven't seen many examples. What if you have a cached sim, like FLIP particles, that you need to use in another dopnet. So you have null nodes like OUT_surface, OUT_vel, OUT_particles. What would you call that subnet? fluid_source? It would be nice to see other people's conventions regarding these.

Thanks :)

Link to comment
Share on other sites

Yes, I object merge it into other objects, or subnets. I usually have something like /obj/particle_fluid (whatever the shelf tool naming convention is, or whatever I've renamed it to match my scene better) ... then stuff like /obj/particle_fluid/OUT_vel /obj/particle_fluid/OUT_cache (all fields, straight out of the cache basically), then, /obj/particle_fluid/OUT_particles /obj/particle_fluid/OUT_mesh (surfaced particles). The naming you have makes sense. Do what works for you, but as long as it will make sense to others as well. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...