Rendering queue (or macro script) from different files

   16528   7   4
User Avatar
Member
120 posts
Joined: July 2009
Offline
I am wondering if there is a way to set up a rendering queue to render mantra nodes from different files so that it would cycle through a set number of files I have prepared and do the render and then save it a certain way.. this would be something along the lines of a macro script I think as I used to do this in 3ds max.. is there a way to set this up in houdini?
User Avatar
Member
1631 posts
Joined: July 2005
Offline
Hi,

You can use hrender to batch render hip files. However, please read this thread [sidefx.com] first for more information and alternatives. If you think the hscript alternative works better for you, you can stop reading now.


I'm assuming you're on Windows but if you're not, most of it should still apply. hrender is a csh script so you have to start the Command Line Tools and in the command prompt, type “csh” and hit Enter.

Now, type “hrender -h”, hit Enter and you should get the usage text (which you should familiarize yourself with). This means you're good to go.

To test, you can do the following:
hrender -v -d your_ROP cpath_to_your_file/file_with_no_spaces_in_name.hip

This should render out a single frame. The -v option will print out information as hrender runs.

By default, the -e option renders the frame range set in the ROP. If you want to specify a new range, you have to do use -f start end:
hrender -e -f 4 39 -v -d your_ROP cpath_to_your_file/file_with_no_spaces_in_name.hip

To get a batch render going, you have to create a csh script but before we do that, we need to copy a line from the hrender csh script.

Open up Windows Explorer, go to the directory where you installed Houdini, for example, C:\Program Files\Side Effects Software\Houdini 10.0.xxx\ and go into the bin directory.

Look for hrender and open the file with Notepad or your favourite text editor. Copy the first line that starts with “#!Cblah blah blah”, start a new Notepad and paste it.

You can copy & paste the following in the new Notepad window but skip the first line as it is what I copied from the hrender csh script on my machine.

If you have spaces in the path or filename, you have to put double quotes ( " ) around it to make sure the script knows there are spaces.
#!Csoftware/HFS100~1.295/bin/csh.exe -f
hrender -e -v -d ROP cno_spaces_in_path/no_spaces_in_file_name.hip
hrender -e -v -d ROP “cspaces in path/spaces in file name.hip”
Please edit the file as needed and note the use of forward slash ( / ). You can save the file as “batch.csh” in any directory or in the same directory as your hip files.

To test the script, you can start a new Command Line Tools, navigate to the directory where you save the file and type:
csh batch.csh

I recommend testing with just a few frames for each hip file to make sure everything is working properly.

Please let us know how it goes. Have fun!

Cheers!
steven
User Avatar
Member
120 posts
Joined: July 2009
Offline
Thanks for the nice detailed response.. I will try this when I get a chance and let you know how it goes… also, yes I am using windows.
User Avatar
Member
6 posts
Joined: April 2009
Offline
Hi stevenong

Thanks for the kindly instruction!

I will try and see if it works properly in my own case.

User Avatar
Member
4 posts
Joined: Dec. 2009
Offline
Hello Steven.

I was looking for instructions for batch rendering and came across this thread. Cheers for explaining the process in such detail.

I am on Windows and I followed all the steps that you have listed above. However, when I go to the path where the .csh file is stored and type batch.csh, it gives the error:

C:\Documents and Settings\Arpita\My Documents\practise_houdini\work_files>csh ba
tch.csh
Missing }.
Missing }.
}}: Command not found.
Missing }.
}viewkind4uc1pardf0fs20: Command not found.
cat: Command not found.
Error: Unknown option: cDocuments and Settings/Arpita/My Documents/practise_ho
udini/work_files/dodecahedronv4.hipf1par
*****
rm: Command not found.
}: Command not found.

C:\Documents and Settings\Arpita\My Documents\practise_houdini\work_files>

What I have used in the batch.csh file is:

#!CPROGRA~1/SIDEEF~1/HOUDIN~1.3/bin/csh.exe -f
hrender -e -v -d mantra_low “cDocuments and Settings/Arpita/My Documents/practise_houdini/work_files/dodecahedronv4.hip”


Is this similar to the hbatch renders in unix? This is very interesting and I would really like to test this and know what I am doing wrong.

Thanks in advance.
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
hello stevenong,
thanks for the informations about batch render.

So far I can render and rop node using hscript.

But for some reason the hrender does not work for me, I tried directly to the command line tools and using a script but both ways give me the same error.

C:\Programes Files\GnuWin32\bincat: /dev/null: No such file or directory

which has nothing to do with Houdini i guess because the csh by its own works on the hmcd.

Does any have any idea how can I fix that and why hrender needs that?
User Avatar
Member
30 posts
Joined: Oct. 2014
Offline
Hi every one,

I was reading this thread and help me out a lot, how ever I am getting this error

AttributeError: `NoneType' object has no set attribute “set”

not sure what that means. any tips?

Houdini 15.5

Mac OS

I can't seem to get it to work when its pointing to a merge file
Edited by Angel Negron - Feb. 8, 2017 16:05:26
User Avatar
Member
280 posts
Joined: Dec. 2015
Offline
Hi everyone…
just wanted to share some insight in the subject.
First of all, if you are working on windows remember you have to invert the dashes windows explorer uses

basically:
C:\Programes Files\GnuWin32\pedro.hipwill be
C:/Programes Files/GnuWin32/pedro.hip
second
I did not get it to work properly without expressly inputting the frame range like so:

hrender -e -f 1 75 -v -d /out/Beauty C:/yourhipfile.hip
so my batchfile will look like this:
#!C:/PROGRA~1/SIDEEF~1/HOUDIN~1.600/bin/csh.exe -f
hrender -e -f 1 75 -v -d /out/Beauty C:/yourhipfile.hip
hrender -e -f 1 75 -v -d /out/Beauty C:/yourhipfile2.hip

Also for some reason it will not work unless I run it through a shell window inside Houdini.
I think is because there are some environment variables that gets set when opening the software.

But the mayor drawback is that it seems to run both scripts at the same time or one frame from each hip file at the time. If anyone knows anyway to avoid this will be great. (I am really trying to avoid having to install Hqueue client and server just to do a batch render)
https://www.imdb.com/name/nm8408875/ [www.imdb.com]
  • Quick Links