Jump to content

skip rendering frames based on parameter value


jon3de

Recommended Posts

I have a switch with some inputs. Swtich input is linked to $F to loop through.

For all of the inputs I created a detail attribute "type" e.g. "sphere" / "torus" / "box". The null node reads the detail attribute and writes the value in its parameter.

 

I want to setup the rendering in a way that it will skip the render if the null node detects that I am rendering a "box". I thought of doing that with a pre frame script that checks the parameter of the null node if its == "box" and then skip the render. 

What would be the best way to  skip the render here? Is there a hscript or python expression for that? 

Jon

image.thumb.png.543cbea9a2d6b3e469ebea5fe39908ff.png

skipFramesByAttributeValue.hip

Link to comment
Share on other sites

Hi, try this in your pre-frame script

read_node = hou.node('/obj/skip_frames_based_on_attribute/read_Detail_attribute')

path  = read_node.path()

value = read_node.evalParm(path+"/obj_type")

switch = hou.node("/obj/skip_frames_based_on_attribute/switch1")

if "box" in value:
    offsetvalue = switch.evalParm("offset")
    offsetvalue +=1
    switch.setParms({"offset":"%d"%offsetvalue})
    

image.png.7ae8b4ab292c04f05d78ef56867e724c.png

 

Also i had to do some change for the switch sop.

image.png.3b5c45b83e2c3e7d2eb97382d14579b6.png

 

Cheers,

  • Thanks 1
Link to comment
Share on other sites

Hey Jeremiah, thank you for your post. 

If I got it correct, in your file the renderer does not skip or abort the rendering prozess for that frame it just renders the next object in the switch. And  then in the next Frame it renders that object again. Which is not what I want. 

Lets say I render this project for the first time. I have rendered frames 1 - 10 and I have  10 ifd files on disk .

Then I have to rerender the images because of some adjustments on the sphere and the torus. I want to be able to send the whole sequenz to the farm again but the script should prevent oversaving the ifds where it detects that there is the e.g. "box" attribute on it. 

This scene file is a small simplified part of an automated pipeline Im working on with thousands of images. Maybe my plan will sound a little bit strange :)

Link to comment
Share on other sites

Hi Dominik, 

That sounds not to bad. I will dig into that. Since Im rendering with Deadline I could also create the array with a python script and paste that in the override Frames parameter in the deadline Submission Dialog. That could work. 

image.thumb.png.f35225163e8ec7a7c9208d37e867d016.png

Thank you!!

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