Jump to content
yongbin

render unconnected frames at once?

Recommended Posts

Is there a fast, easy way to render unconnected frames? [2 13 55-63 99 ....]

In houdini, or in command line.

Thank you.

Share this post


Link to post
Share on other sites

cheap way is the following: you could set up multiple mantra nodes in the render output network. then configure each of them with the frames you want. Then connect them to a merge node and hit render

Share this post


Link to post
Share on other sites

Thank you for answer strages.

That works but if I have many frames to render (eg. over hundred), then manually create node is time consuming and little tricky.

I want 'more more more' easy way. I try "frame dependency" or "frame container" node. But I think that is not a proper approach.

Share this post


Link to post
Share on other sites

I think you can figure out a way to do this with expressions. They can be used in so many ways and there has to be a way that Houdini knows which frames you actually need.

manually is indeed not the procedural way but houdini always offers an option :)

an example, last expression that i came across that had some really nice usages was ressions/opdigits'>opdigits

good luck

Share this post


Link to post
Share on other sites

The problem here is that frame range is evaluated only once. on the beggining of the render, so expressions that change over time dont work (as the keyframes dont either)...

from command line it would be easy to write script that parses something like [2 13 55-63 99 ....] an run mantra for every range in in that sequence...

And that is more (bash, dos or maybe python) question

I would grab some script from comments here:

http://www.sidefx.com/docs/houdini9.5/rendering/commandline

and modified to parse such input range.

When you decide wich scriptting choice to choose, you can ask us more questions..

I would choose python, becouse its most corssplatform and it have regular expression wich are very useful for parsing..

Share this post


Link to post
Share on other sites

I've done this in the past by writing a python script that takes in a bunch of frame numbers and calls hrender once per frame. I don't have the script anymore it wasn't too complicated to write.

Share this post


Link to post
Share on other sites

I just quickly made a ROP HDA to show a way it can be done. This takes a bunch of space separated frames in the "frames" parameter like 1 4 6-10 13 and so on and then renders with the node in the render node parameter. This is hacked in just a few minutes in python so there no error checking, be aware! :)

renderFrames.otl

Edited by Magnus Pettersson
  • Like 2

Share this post


Link to post
Share on other sites

I just quickly made a ROP HDA to show a way it can be done. This takes a bunch of space separated frames in the "frames" parameter like 1 4 6-10 13 and so on and then renders with the node in the render node parameter. This is hacked in just a few minutes in python so there no error checking, be aware! :)

It's rendering only ranges (and current frame for single ones in string), so "1 2 20-24" will not work. I modified it and it seems to work now as expected (but i'm new to python though=). TS, just open type properties of the original otl and change code in Script tab.

def renderframes(rootNode):
mantra = hou.node(rootNode.parm("rendernode").eval())
frames = rootNode.parm("frames").eval()
timerange = mantra.parm("trange")
timerange.set(1)
for f in frames.split(" "):
range = f.split("-")
if len(range) == 1:
mantra.parm("f1").set(f)
mantra.parm("f2").set(f)
else:
mantra.parm("f1").set(range[0])
mantra.parm("f2").set(range[1])
print "Rendering:", range
mantra.parm("execute").pressButton()
pass[/CODE]

I used range mantra mode even for single frame cause i don't know if moving current frame is bad or not)

Edited by bloomendale
  • Like 1

Share this post


Link to post
Share on other sites

It's rendering only ranges (and current frame for single ones in string), so "1 2 20-24" will not work. I modified it and it seems to work now as expected (but i'm new to python though=). TS, just open type properties of the original otl and change code in Script tab.

Ah nice, I forgot to check that. For all single frames it just rendered the frame that you are on in the timeline and i happened to be on the frame i tested with hehe. But like you said, its better to put it on ranged than to change current frame each time and need to reset it back to what it was before rendering :)

Edited by Magnus Pettersson

Share this post


Link to post
Share on other sites

Thanks, magnus and bloomendale!

That works greatly!

I fixed it a little with my flavor.

Your key concept isn't changed, It doesn't directly render, rather it just makes bunch of Nodes.

Edited by yongbin

Share this post


Link to post
Share on other sites

I've updated this otl to work with HOU15.5

The default mantra_ipr node has keyframes set so script logic ignored

            copiedNode.parm("f1").deleteAllKeyframes()
            copiedNode.parm("f2").deleteAllKeyframes()

renderFrames_changed.otl

  • Like 2

Share this post


Link to post
Share on other sites

Amazing, I was looking into this today, and you've updated it for 15.5 an hour before I arrived here :P

  • Like 1

Share this post


Link to post
Share on other sites

I think the best solution is to go to your render folder, delete all the bad frames, and in your mantra ROP keep your full frame range and set the Skip Rendered Frames to Skip files that exist. 

This will skip all the frames that are rendered and will only render the missing ones.

Share this post


Link to post
Share on other sites
Posted (edited)

Something is not working with houdini 17

 

C:/PROGRA~1/SIDEEF~1/HOUDIN~1.416/houdini/vex/include/physicalsss.h: Using uninitialized variable: nmax (247,26:29)
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.416/houdini/vex/include/physicalsss.h: Using uninitialized variable: dist (247,46:49)
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.416/houdini/vex/include/physicalsss.h: Using uninitialized variable: nmax (249,21:24)
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.416/houdini/vex/include/physicalsss.h: Using uninitialized variable: dist (253,57:60)

A head-light was automatically added to the scene. If the soho_autoheadlight parameter cannot be found in the Objects tab, add the rendering property to control this behaviour.

render_frames.hipnc

Edited by philpappas
attachments

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×