Simple batch file question, for overnight renders

Started by jknow, August 21, 2010, 07:49:53 PM

Previous topic - Next topic

jknow

I was pleasantly surprised to see how easy it is to control terragen from the command prompt in windows.

I pasted two lines into the command prompt, pressing enter after each one:

cd C:\Program Files (x86)\Planetside Software\Terragen 2 Deep Edition\

tgdcli -p "D:\Documents\PhD\Experiments\14. Lakes Model\TG2 model\animation test\1.tgd" -hide -exit -r -o "D:\Documents\PhD\Experiments\14. Lakes Model\TG2 model\animation test\1.bmp"

But obviously I want this to run with lots of files. I imagine I'll create a separate .tgd for each job, and let it get on with the rendering. This solves many problems.

I tried to turn the above lines into a .bat or .cmd file but they don't work.

This is pretty basic I'm sure, but not obvious to me. How do I write a script that will be executed in the command line? I don't want to have to stay up all night pressing enter for each new line! Thanks

jknow

I believe this works, saved as a .cmd text file


"C:\Program Files (x86)\Planetside Software\Terragen 2 Deep Edition\tgdcli" -p "D:\Documents\PhD\Experiments\14. Lakes Model\TG2 model\animation test\2.tgd" -hide -exit -r -o "D:\Documents\PhD

\Experiments\14. Lakes Model\TG2 model\animation test\2.bmp"


"C:\Program Files (x86)\Planetside Software\Terragen 2 Deep Edition\tgdcli" -p "D:\Documents\PhD\Experiments\14. Lakes Model\TG2 model\animation test\1.tgd" -hide -exit -r -o "D:\Documents\PhD

\Experiments\14. Lakes Model\TG2 model\animation test\1.bmp"


I still don't understand why commands that worked fine in the command prompt did not work in the .cmd file, so if anyone can explain that would be great. Otherwise, problem solved.

bigben

I use commandline for rendering animations via a .bat.  You can save a bit of code by specifying the output file in the tgd.

C:\Apps\tg2\tgdcli.exe -p "C:\Workspace\TG2\animated stars_0012.tgd" -hide -exit -r -f 271

The -f nnn is the frame number of the animation which only applies to the animation version to TG2