Hi,
I'm trying to do some automation using hbatch, and I've come across a bit of an issue when trying to override the output files when calling the ‘render’ command.
When I call:
render -f 1 10 -a -o /path/to/myNewRenders.$F4.exr mantra1
And look in the created .ifd files, each .ifd file is set to render to /path/to/myNewRenders.0001.exr, because, I'm assuming, the variable substitution happens when calling the ‘render’ command, when the frame context is 1.
Alternatively, I've tried:
render -f 1 10 -a -o /path/to/myNewRenders.\$F4.exr mantra1
Which writes “/path/to/myNewRenders.$F4.exr” into the .ifd files, which would sound right to me, but when I pass this .ifd file into mantra to have it rendered, it, once again, evaluates the frame as 1, giving me a resulting file of /path/to/myNewRenders.0001.exr
Any idea how I can do this without calling something like:
render -f 1 1 -a -o /path/to/myNewRenders.0001.exr mantra1
render -f 2 2 -a -o /path/to/myNewRenders.0002.exr mantra1
render -f 3 3 -a -o /path/to/myNewRenders.0003.exr mantra1
render -f 4 4 -a -o /path/to/myNewRenders.0004.exr mantra1
render -f 5 5 -a -o /path/to/myNewRenders.0005.exr mantra1
render -f 6 6 -a -o /path/to/myNewRenders.0006.exr mantra1
render -f 7 7 -a -o /path/to/myNewRenders.0007.exr mantra1
render -f 8 8 -a -o /path/to/myNewRenders.0008.exr mantra1
render -f 9 9 -a -o /path/to/myNewRenders.0009.exr mantra1
render -f 10 10 -a -o /path/to/myNewRenders.0010.exr mantra1
Thanks
hbatch : Overriding output using 'render' command
3082 3 2-
- HughMacdonald
- Member
- 2 posts
- Joined: Aug. 2013
- Offline
-
- pbowmar
- Member
- 7046 posts
- Joined: July 2005
- Offline
Hi Hugh,
The easiest thing to do would be to set up the ROP that is actually rendering with the /path/to/file.$F4.exr then just call “render” on the ROP itself…
Is there any reason you can't do that?
You can still do it by scripting with two lines:
opparm RopThatIsToRender outputfile ‘/path/to/file.$F4.exr’ (note single quote protect the $F4)
render RopThatIsToRender
NOTE: The parameter name “outputfile” may be wrong, I don't have Houdini open ATM. Hold your mouse over the label on the ROP and it will tell you the name. Unless you're on Linux in which case you might just get black
Cheers,
Peter B
The easiest thing to do would be to set up the ROP that is actually rendering with the /path/to/file.$F4.exr then just call “render” on the ROP itself…
Is there any reason you can't do that?
You can still do it by scripting with two lines:
opparm RopThatIsToRender outputfile ‘/path/to/file.$F4.exr’ (note single quote protect the $F4)
render RopThatIsToRender
NOTE: The parameter name “outputfile” may be wrong, I don't have Houdini open ATM. Hold your mouse over the label on the ROP and it will tell you the name. Unless you're on Linux in which case you might just get black

Cheers,
Peter B
Cheers,
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
-
- HughMacdonald
- Member
- 2 posts
- Joined: Aug. 2013
- Offline
Thanks Peter, much appreciated.
The reason I was trying to do it in batch mode was that this is for a command-line (outside of Python) script to send a .hip to the farm to generate .ifd files and then render them. I wanted to allow a command-line option to override the final files that were being generated. I've actually since shifted this code from hbatch over to hython, which is a little easier to do things in!
Having a dig around in Hython, it appears that the parameter in question is “vm_picture”.
Thanks for the direction on this.
The reason I was trying to do it in batch mode was that this is for a command-line (outside of Python) script to send a .hip to the farm to generate .ifd files and then render them. I wanted to allow a command-line option to override the final files that were being generated. I've actually since shifted this code from hbatch over to hython, which is a little easier to do things in!
Having a dig around in Hython, it appears that the parameter in question is “vm_picture”.
Thanks for the direction on this.
-
- pbowmar
- Member
- 7046 posts
- Joined: July 2005
- Offline
-
- Quick Links


