kungFu Posted March 3, 2016 Share Posted March 3, 2016 Hi, Right now the farm I'm using doesn't distribute a single geometry ROP across machines. Is there an existing way to ROP geometry out from a single source that will give me multiple geometry ROPs so it can be distributed on a farm? I can dup a bunch of ROP's and punch in frame ranges, but it takes a bit. Would this be a Python thing (to create and destroy ROPs): like this sorta thing: int @Divisions @Range = rint ( ( ($FEND - $FSTART) + 1) / @Divisions) start end $FSTART @Range @Range+1 @Range*2 (@Range*2) +1 @Range*3 (@Range*3) +1 $FEND ...or use % Thanks! kungFu Quote Link to comment Share on other sites More sharing options...
Atom Posted March 3, 2016 Share Posted March 3, 2016 (edited) You could write a Pre-Render script that reads an external file to set the frame range. Then your HIP would have just one ROP but it's start and end frames would come from an external text file. On the farm you could deploy that single HIP along with the companion text file that specifies a start and end frame for each render machine. Something like this... node = hou.pwd() # Get the node this code is running under. file_name_in = r"C:\Path_To\my_frame_range.txt" with open(file_name_in, 'r') as f: lines = f.read().splitlines() # Remove slash n character at the end of each line. f.close() # Assume we have one line with two numbers separated by a comma. (i.e. 120,180) ary = lines[0].split(",") start_frame = ary[0] end_frame = ary[1] # Assign the start and end values to the parms in this ROP Output Driver or File Cache node. p_start = node.parm("f1") p_end = node.parm("f2") p_start.set(start_frame) p_end.set(end_frame) NOTE: Remember to delete the current $FSTART and $FEND variables from the frame fields so the script will be able to overwrite those values. Edited March 3, 2016 by Atom 1 Quote Link to comment Share on other sites More sharing options...
kungFu Posted March 3, 2016 Author Share Posted March 3, 2016 Nice. So I would still have to generate a file (my_frame_range.txt) for the script to read that would generate the ranges, but any farm instance can render w any text file as long as they don't use the same one. RIght? Thanks! Quote Link to comment Share on other sites More sharing options...
Atom Posted March 3, 2016 Share Posted March 3, 2016 (edited) That is the concept, you would need to test it out, of course. I don't have access to a network farm. They can still reference the same filename that way you don't need a custom script in each HIP file. But the content of the named file which specifies the frame range would change.Make your my_frame_range.txt inside Notepad or a simple text editor. It should have one line.120,240 Edited March 3, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.