Skip to Content

BATCH RENDERING

Tail Program

 

See the above link description for a discussion about render logs and the tail program.

 

To render in batch on the command line you first need a command line. To get a command line in windows goto the start menu then goto "Run..." and type "cmd" and hit enter. Welcome to the world of dos (a very poor substitute for linux). Now you need to navigate to your project directory where your maya scene file sits. If you don't know how to navigate in dos then read "DOS for dummies" or google "DOS commands" to see what to do. For example, you type the name of the drive like so "G:". Then type "cd development". That will get you to the "G:\Development" directory

 

Then to start a render you need to specify the proj and maya file. You might also want to specify the start frame with the -s option and the -log option to specify a special log file to write to.

render -s 702 -proj "G:\DEVELOPMENT\Fluids" -log logs/702_6_20_07.log "G:\Development\Fluids\scenes\FountainRender.20.mb"

 

If you're doing a hardware render you will have to put in the '-r hw' flag as well.

 

render -r hw -proj "G:\DEVELOPMENT\Fluids" -log logs/TestLogfile.log "G:\Development\Fluids\scenes\FountainRender.20.mb"

 

 

702 is the starting frame number.

 

To get nice output in your log file that contains time statistics for hardware renders then you can put this in your render settings "Pre render frame MEL" and "Post render frame MEL".

 

Pre render frame MEL: $startTime = `timerX`; print "Start Render Time::::::"; print(`date -format "hh:mm:ss MM/DD/YYYY"` + " ");

 

Post render frame MEL: $totalTime = `timerX -startTime $startTime`; print("Total Render Time: "+$totalTime+"\n");

 

Without these statements then your hardware render log will look like this:

 

Rendering frame 1 : E:/Shumaker/renders/Galaxy/TestGalaxy.1.1.iff
Rendering frame 2 : E:/Shumaker/renders/Galaxy/TestGalaxy.1.2.iff
Rendering frame 3 : E:/Shumaker/renders/Galaxy/TestGalaxy.1.3.iff
Rendering frame 4 : E:/Shumaker/renders/Galaxy/TestGalaxy.1.4.iff
Rendering frame 5 : E:/Shumaker/renders/Galaxy/TestGalaxy.1.5.iff

 

With the the pre and post mel statements your render logs will look something like this:

 

Start Render Time::::::17:54:53 06/28/2007 Rendering frame 1 : e:/shumaker/renders/Galaxy/TestGalaxy.1.1.iff
Total Render Time: 1.68
Start Render Time::::::17:54:54 06/28/2007 Rendering frame 2 : e:/shumaker/renders/Galaxy/TestGalaxy.1.2.iff
Total Render Time: 1.61
Start Render Time::::::17:54:56 06/28/2007 Rendering frame 3 : e:/shumaker/renders/Galaxy/TestGalaxy.1.3.iff
Total Render Time: 1.56
Start Render Time::::::17:54:58 06/28/2007 Rendering frame 4 : e:/shumaker/renders/Galaxy/TestGalaxy.1.4.iff
Total Render Time: 1.56
Start Render Time::::::17:54:59 06/28/2007 Rendering frame 5 : e:/shumaker/renders/Galaxy/TestGalaxy.1.5.iff
Total Render Time: 1.55

 

 

Comments

I like this format a little

I like this format a little better:

$frameStart = `timerX`; print("Start Render Frame " + `currentTime -q` + " @ "); print(`date -format "hh:mm:ss MM/DD/YYYY"` + "\n");

The software renderer in Maya 2009 doesn't print the frame number it is rendering to the log, so it's good to have the frame printed. The hardware doesn't seem to do it either for the Maya 2009 Mac version I'm using right now.