PDA

View Full Version : script for rendering


preeya
03-29-2005, 06:31 AM
hi all

i want a rendering script which can automate rendering 1 scene after another n when d scenes are render d computer should shutdown automatically
can anybody help?

Dialector
03-29-2005, 01:52 PM
What you are looking to do is called a batch render.

You can write a ".bat script" (windows) invoking render.exe
Look up the flag augments. I write them in notepad.
Im sure you can add a shutdown command to the text file at the end which I think is just "shutdown -s". This will run all your renders then shutdown the computer.

You run the "render" command for each scene you want to render. There are about 50 flags to control all sorts of things, but its best to make sure your scene and render globals are already set up the way you want. You save the file as a plain text file but with a ".bat" extension. Then just double click on the file.

To get info on this open Maya, press F1 (F1 is my friend) and look up "batch render"
under the what is "start batch render" article it will give you the basic info you need to put into your text file and have a link for the batch render flags you can use to adjust your render.

preeya
03-30-2005, 09:11 AM
hey thks a lot for rply ,i'm not a programming girl ,so can u jus post a sample copy of hwt exaclty n how exactly it should be,it will b a gr8 help 2 me
hoping ur rply

0NRG
03-30-2005, 11:55 AM
Hey preeya

If your on a PC open notepad and write render -s (start frame here) -e (end frame here)
-cam (your render cam) (your file name).ma then after you've done that save it as whatever but make it a .BAT file put it in your project file with your scene file and double click it should start spiting out info and the files should go to the images folder in your project as for the shuting down I can't help you sorry.

eg. render -s 1 -e 100 -cam camera1 preeyascene.ma

if you need more help let me know

deadplant155
03-30-2005, 05:16 PM
hmm, that most certainly did not work for me.
does it have to be a .ma? or will .mb work too?
does maya have to be open? will it render with mental ray? or just the maya-software?
and does it give you any progress messages? or do you just have to assume it's working and wait for an image to show up?
when i tried it, the command prompt got flooded with one line just repeating itself over and over again, just the path to the .bat file i created and the name of it. what'd i do wrong?
sorry, this isn't my thread, but i was interested so i gave it a try, if you know what i did to break it let me know please, thanks!

-loren

0NRG
03-31-2005, 12:28 AM
Can you please post what you put in the .BAT file, it can be .ma or .mb but .ma is prefered because you can open it in a text editor if problems occur. Maya should be closed so you can get the most out of your computers resources. You can render with mental ray but it's different commands check out maya help under rendering and look for command line flags. The maya file has to have your render globals set just like you where going to batch render from in maya and they have to match the flags (eg -cam) in your .BAT file. The .BAT file also has to be located in the same directory as the scene file. To check out any errors just open the dos window and drag the .BAT file in and hit enter with the window selected. It should run it and if it errors out it should tell you what the error is.

Good luck!

preeya
03-31-2005, 07:03 AM
hey orng

can i use dis for multiple scenes rendering,like a list of scenes to render an as a list get over the pc should shut down

zuao
03-31-2005, 11:47 AM
for shutdown
http://www.sysinternals.com/ntw2k/freeware/pstools.shtml

or this ...
http://www.robvanderwoude.com
-> search site for shutdown (prompt in top right corner)

ciao,
nando.

0NRG
04-01-2005, 03:11 AM
Hey yeah you just add multiple lines to the .BAT file so

eg. render -s 1 -e 100 -cam camera1 preeyascene.ma
render -s 1 -e 50 -cam camera1 testscene.ma
render -s 30 -e 100 -cam camera1 happyfeet.ma

as for the shutting down those links that zauo posted look pretty promising depending on what system your using I think you just include either the commands or the path to the .EXE file with the file name of the .EXE file

since I downloaded the PsShutdn for win2000 it would be

render -s 1 -e 100 -cam camera1 preeyascene.ma
render -s 1 -e 50 -cam camera1 testscene.ma
render -s 30 -e 100 -cam camera1 happyfeet.ma

C:\Documents and Settings\user\My Documents\PsShutdn.exe

Thanks for the tip zuao!

Dialector
04-01-2005, 12:36 PM
I you want to shut down after rendering. Just type "shutdown -s" after the last file in your render script. The .bat file will execute that command after the last render and your computer will shutdown. No need for other executables.

pixade
04-02-2005, 02:39 AM
what do you do when dos no longer recognizes the 'render' command? what i did in the past was reinstall maya. but is there another method that would be easier? why is this bug happening?

thanks!

Dialector
04-02-2005, 02:47 PM
It sounds like your system paths need updating.
If you on XP then right click on the my computer icon
click on the advanced tab
click on Environment Variables
Under System Variables select Path
click edit under that window
look for the "C:\Program Files\Alias\Maya6.0\bin;" in the path
if its not there add it.
if that dosnt work for some reason, just add that as the full path for your render command in your scripts. Its extra work but cut and past helps mitigate that.

------------------

pixade
04-06-2005, 04:55 AM
look for the "C:\Program Files\Alias\Maya6.0\bin;" in the path

if that dosnt work for some reason, just "add that as the full path for your render command in your scripts."

do you mean add "C:\Program Files\Alias\Maya6.0\bin;" render? or is the bin file call the render cmd?

thanks for your help so far, i can't stand it when i have to reinstall.

Cameo
04-14-2005, 03:39 PM
So if you make a .bat with say 5 scenes to render, will it execute the .bat and try and render them all at once by launching seperate instances of mayabatch.exe or will it launch the first render and then once thats finished go to the next line in the .bat and launch the render for the second scene and so on and so forth?

pixade
04-14-2005, 03:49 PM
it will go in sequence ..... one after another till completion

Cameo
04-15-2005, 09:07 AM
Thats super useful. Cheers.

preeya
04-15-2005, 10:49 AM
hey dtas was amazing
thks a lot onrg n zuao
wow thank u so much
now renderign is not a prob 4 me


thks

whookam
04-15-2005, 07:05 PM
Anyone have any idea if/how it works in OSX?

Dialector
04-16-2005, 01:56 AM
For batch command line render in OSX check:
http://www.cgtalk.com/showthread.php?t=202674

CGTalk Moderation
04-16-2005, 01:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.