Jump to content

Recommended Posts

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

Link to comment
Share on other sites

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 by Atom
  • Like 1
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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