Jump to content

Automate Caching and Rendering in One Process?


pupps09

Recommended Posts

Hi,

Pretty much a beginner in Houdini and was wondering if there is an efficient way to automate the following process.

step 1. write out a cache(.bgeo, etc...) using a DOP I/O or File Cache SOP.
step 2. After the files are written, automatically have the SOP switch to "Load from Disk"
step 3. render out the result in Mantra.

Was thinking a Post-Render Script which would switch the read/write inputs inside the DOP I/O or File Cache SOP would be the answer, but not exactly proficient in scripting.

Any kind of help would be appreciated. Thank you in advance.:D

P.S. Attached an example to clarify what I'm trying to do. 

example.jpg

Link to comment
Share on other sites

Hey Carlo, thx for the hip file! :D

It works great...but if I were to have to cache out another node downstream, for example the flip surface cache in the example above, does that mean that I would have to break apart the existing node tree and add a file SOP(reading the output geo from import_wavetank) before the particle fluid surface node?

Link to comment
Share on other sites

Yeah so where ever you want to cache you can just put a null there and a file sop after. In the case of your network above, you'd put a null after particlefluidsurface1 then you can drop a geometry node into out and use that to render your cache. You'd have a file SOP after the null reading back in the cached geo. The idea is to get all the actual geometry render nodes into the out context so you can chain them up to render together.

I'm not sure how to do it any other way, if there is a way hopefully someone will jump in but I find this way the simplest for me to understand and implement.

Link to comment
Share on other sites

OK, I understand the thinking behind your process and there's no doubt it works. Will def implement this until I find another solution:P 

Was just hoping there was a way without breaking the node tree apart, just in case I had to re-adjust the simulation. 

Thx for the help! Much appreciated.

Link to comment
Share on other sites

Having slept on this, you could always wire up a switch like so. If you have multiple switches, channel reference all their inputs to a master value on a null so one toggle switches them all between cache and pass through.

 

Capture.JPG

Edited by carlo_c
Link to comment
Share on other sites

Thx! Havent yet tried this out, but if you're gonna do it through switches, I believe that the DOP I/O SOP is actually doing the switch internally, so maybe better to reference the internal switch and not have to add the extra File SOP?

Anyways, will give it a try later. Thx for the advice. 

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