Render batch of ifd's

   6351   3   2
User Avatar
Member
245 posts
Joined: Sept. 2008
Offline
How do I render a batch of IFD files in Windows? I saw the sample .bat script in the help files but it didn't seem to work for me. What is the syntax? I get an error that says “DO was unexpected at this time”

:: ||render ifd ||
:: ### Settings ###
:: — Path name =// ‘C:\\filefolder\\titomaster_’
SET pathName=F:\\houdini9.1_F\\ifd\\beat_grid_10\\test.
SET start=0001
SET end=6688
:: — Suffix =// .ifd
SET suffix=.ifd
(
@echo. ####### RENDER SECUENCE #########
@echo.
@echo.FILE: %pathName%
@echo.START: %start%
@echo.END: %end%
@echo.JOB: mantra -f %pathName%%start%-%end%%suffix%`\t
@echo. FOR /l %%v IN (%start%, 1, %end%) DO IF %%v LEQ 9 (mantra -f %pathName%000%%v%suffix%) ELSE ( IF %%v LEQ 99 (mantra -f %pathName%00%%v%suffix%) ELSE ( ( IF %%v LEQ 999 (mantra -f %pathName%0%%v%suffix%) ELSE ( IF %%v LEQ 9999 (mantra -f %pathName%%%v%suffix%)))))
FOR /l %%v IN (%start%, 1, %end%) DO IF %%v LEQ 9 (mantra -f %pathName%000%%v%suffix%) ELSE ( IF %%v LEQ 99 (mantra -f %pathName%00%%v%suffix%) ELSE ( ( IF %%v LEQ 999 (mantra -f %pathName%0%%v%suffix%) ELSE ( IF %%v LEQ 9999 (mantra -f %pathName%%%v%suffix%)))))
@echo.
@echo.=================================================================
@echo.### DONE ###
@echo. @echo. )
pause
User Avatar
Member
52 posts
Joined: June 2009
Offline
Hi,

For some reason it dint work to me as well. So i wrote a simplified version of it which works for me well and here it is..

Just save this code as .bat file in the dir where u have ur IFDs.

SET pathName = test.
SET start = 1
SET end = 20
(
FOR /l %%V IN (%start%,1,%end%) DO mantra -f %pathName%_%%V.ifd
)
pause

In the pathName, enter your IFD name and ur starting and ending frames in the start and end respectively.

Then execute it from ur houdini command line tools.

Hope this helps.
User Avatar
Member
245 posts
Joined: Sept. 2008
Offline
Thanks Raavenish, I will try it the next time I have a long sequence to render.
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
one very simple and maybe little bit faster way to render a sequence of .ifd (mantra) or .rib (renderman) is to navigate through your command lie to your directory you have your files and without any script just type the normal command for rendering and replace the numbers with *.

for example:
mantra -f test.*.ifd (for mantra)

prman test.*.rib (for pixars renderman)

this is apply to all the renders and to windows, linux, mac.

in the case you want to render a specific range of a sequence and if you do not want to move them in another directory, then you can use a python script which again applies to the OS, by digitallysane, here:
http://www.sidefx.com/index.php? [sidefx.com]option=com_forum&Itemid=172&page=viewtopic&p=62500&sid=70c062602361914877ad3c2cdeb0bdd7 [option]
  • Quick Links