View Full Version : Pre Render MEL / Post Render MEL, what are they?
11-15-2006, 08:00 AM
I am wondering if this is possible scenario...
Let's say I have mutiple scenes to render, and I want them get rendered over night. Since each scene will take several hours to render, I was looking for a solution to "automate" the rendering procedure...
There are options from Render settings window, under Common tab, "render options," several boxes for MEL script... Not sure if this would be how to set "automate" mutiple rendering procedure.
What do you think? Is this possible? If it is, any one can give me some ideas?
Thanks in advance...
PreRenderMel/PostRenderMel as you guessed is how you can tell the renderer to execute some mel code or a script before and after the render.
In theory you could use it to string multiple scene renders together, but that would not be the best way to do it.
The simplest way is to create a batch file, which is just a text file containing the render command-lines one after the other. In windows you would name it "myRenders.bat" for example, with one command per line, like "render scene1.mb" etc. Then double clicking the batch file launches a command-window where the renders are invoked.
You can get info about the command-line syntax by opening a command prompt and typing "render -help"
Alternatively I think there are some scripts on highend that use mel to launch the batch renders, but I havent used those - not sure of the names sorry.
11-15-2006, 05:45 PM
Thanks for fast and great input... I've spent sometime this morning to struggle this again, and seemed now I found my way around this matter... Creadit goes to DigitalTutors (http://www.digitaltutors.com/digital_tutors/index.php), and here is the [link (http://www.digitaltutors.com/chit_chat/showthread.php?t=1612&highlight=rendering+command+prompt)].
For someone else looking for similar matter, here are the steps I followed;
(1) Open up any text editor (notepad or whatnot), and create txt file inside your scene folder.
(2) Change the file extension to "bat" by retyping it in the file name.
(3) Create a stack of render commands (as many as you need) inside this bat file from your text editor. (i.e. render -r sw -s 1 -e 200 -cam persp myScene.mb => "render 'myScene.mb' scenes from frame 1 to 200 with perspective camera." Further command options are available from command shell... Type "render -h" from CMD.)
(4) Save the file, and now you may close Maya.
(5) Open the CMD to display the progress of the procedure, and execute the bat file.
(6) Unless you directs the specific path for rendered images, you will find them from default folder. Also, if you use the specific path here, you may save your bat file any where, not inside your scene folder.
11-15-2006, 05:45 PM
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.