Running multiple folders of cache data through a ROP network.

   2472   3   1
User Avatar
Member
12 posts
Joined: Nov. 2017
Offline
Hello,
I'm looking to automate the generation of vdb cache data from geo cache data. Any assistance you could give would be greatly appreciated

Currently I have a file folder that is reading a cache then vdbfrompoly gets applied to it and the new cache gets saved out via a ROP Output Driver. So the node network looks like file>VDBfromPolygons>ROP output.I would like to run multiple folders(with unique cache data) through the same node network, it would then save the generated vdbs in a new folder. It would need to change the name of the file folder, the output ROP and only hit save to disk on the ROP when the last one was done caching.

I setup a test file that generates some cache geo. Then you can go in the ROP_network and it does a VDBfromPoly then it goes through a ROP output.

Here is the folder structure to replicate if you want to give this a go.


The idea in the sample file would be there is cache in the top three. Then the node network auto fills all three vdb caches from their respective geo cache. I was thinking about iterating using a switch node. I would prefer python though.

I'd really appreciate anyone helping me with this. I'm familiar with python, but not python in Houdini.

Thanks in advance!

Attachments:
folder_structure.PNG (8.6 KB)
ROP_netowrk.hip (150.3 KB)

User Avatar
Member
2528 posts
Joined: June 2008
Offline
You may want to check out the technique used on this batch converter.
http://forums.odforce.net/topic/33026-batch-opening-and-saving-obj-files/?do=findComment&comment=181166 [forums.odforce.net]

Basically it leverages the pre-write script feature of the ROP to re-write it's own input and output fields to make it point to different files/folders when the frame changes.
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
12 posts
Joined: Nov. 2017
Offline
Hmm that is interesting. Thank you! However that specific code I can't seem to get working. I just changed the output fields..

That thread suggests typing: hou.node(“/obj/geo1/rop_geometry1”).parm(“sopoutput”).set(file_dest) in pre-frame script,
where file_dest in my case is “Ctest/output_cache_02/test_0001.geo” will change the output of the ROP to the file_dest location. It does not appear to do that. It takes the output file that was supplied in the UI of the ROP.

From this documentation: http://www.sidefx.com/docs/houdini/hom/hou/RopNode.html [www.sidefx.com] it suggests this line of code:

hou.RopNode.render(output_file=Ctest/output_cache_02/test_0001.geo) That unfortunately is invalid syntax..

At this point all I want to do is change the output file using the pre-render script or pre-frame script. whichever is more suitable.

Thanks again for responding. Sorry that I am clearly missing some things.
User Avatar
Member
12 posts
Joined: Nov. 2017
Offline
Hey,
For anyone from google reading this. I figured out the solution and I wanted to share.
First, open up the python shell. Then this line of code will change the file destination: hou.node(“/obj/geo1/rop_geometry1”).parm(“sopoutput”).set(“C”).
To run the ROP network simply type: hou.node(“/obj/geo1/rop_geometry1”).render()

That should at least put you guys on the right path. Best of luck
  • Quick Links