Community
Maya Shading, Lighting and Rendering
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem batch rendering with .bat file and command line rendering.

9 REPLIES 9
Reply
Message 1 of 10
Anonymous
2268 Views, 9 Replies

Problem batch rendering with .bat file and command line rendering.

Quick problem description:

Using notebook, I set up a text file batch render just to test out the process for myself after studying it out of the book I'm referencing. I save it with a .bat extension as instructed, in the same folder as the file being rendered. I save and exit the file, then double click it, also as instructed.

The command window then opens, but only for a fraction of a second and then disappears. The render never start and no files are created. The same failure occurs when attempting to do the same thing with a command line render.

After many hours researching the problem, I can't find anything on it. I don't know if it has anything to do with Windows 7 64 bit which is what I'm running Maya 2010 on, or if there's a particular setting within Maya that could cause this, or if it's a Windows 7 issue (I'm running it as the administrator) but I'm hoping a shout out to this community can produce an answer to this frustrating problem.

Thanks in advance.
9 REPLIES 9
Message 2 of 10
panumme
in reply to: Anonymous

I have the exact same frustrating problem.

Creating a .bat file has been an important part of my work flow for many years now.

Is it because we are to be forced to use backburner instead? I often render big single images where backburner is an overkill and troublesome to relate to sometimes.

Hope someone has an answer or a solution to this.
Message 3 of 10
LeowTeikSiong4119
in reply to: Anonymous

Have you set the path on the System environment Variables to point at your Maya?
I found that Maya 2010 on Window 7 wont create the path automatically.
I'm using .bat and backburner at the same time and no problem...
Message 4 of 10
halfstone
in reply to: Anonymous

there is probably a syntax error or spelling error in the batch script - but as soon as it doesn't execute the command window goes away.

After the last line in your batch script, put one more line with the word "pause" in there - (no quotes). That will keep the window open and allow you to read any errors. It's so easy to forget to put a space after a flag, or to use a capital letter by mistake -
Message 5 of 10
olygraph
in reply to: Anonymous

You could also try to put the verb message to progress if using mental ray to see what is going on during the rendering process. Create a log file via the -log command option, or you can add the command PAUSE at the end of the .bat like halfstone just said.

Cheers, Oly.
Message 6 of 10
rafael_nubile
in reply to: Anonymous

Hi guys! I got the same here!

I did a screenshot from the superfast DOS window and it says something like that: (I translated from portuguese)

After each line from my batch file it says:
'render'is not recognized as an internal or external command, operable program or a batch file.
Message 7 of 10
Anonymous
in reply to: Anonymous

Hey guys I would try just executing the same line of code inside the console window first, you wont have the trouble of the window closing on you if the command is typed incorrectly or there is something wrong with the flags in general.

First thing I would try, if you havent already is typing "render" with an uppercase "R". Unless of course your exe state otherwise. From my experience OSX doesn't require you to do so, but all the windows machines I have rendered on have.

Other than that if the command is unrecognized you probably need to setup the environment variable as one of the earlier posters had stated.

Although not Windows 7 specific this explanation of environment variables and their functions is really nice. http://vlaurie.com/computers2/Articles/environment.htm

Ultimately though you want to add a directory to the PATH variable. At the end of it's "variable value:" you will add a Semicolon separating individual directories and then copy and pasting the directory path to the folder that contains your "render" executable which I believe natively is in the bin folder of your Autodesk software. You'll have to forgive me for not knowing the exact location I am on a Mac right now.
Message 8 of 10
rafael_nubile
in reply to: Anonymous

FIXING THE PATH ON THE SYSTEM ENVIRONMENT VARIABLES WORKS!!! Just do it like TroyGBIV said.



A small tutorial for the beginners like me! ;)


1. Copy the path from your Maya bin folder (Mine was: C:\Program Files\Autodesk\Maya2010\bin)

2. Go to Start and right-click on Computer

3. Click on Advanced system settings. Inside the System Properties Window, on Advanced tab, click on Environment Variables...

4. Inside the System variables box, search for the variable Path. Double-click on it or select and click on Edit button.

5. On the second line, Variable value, type a semicolon after the last word and then, paste your Maya bin folder path without any space.

6. Click Ok until close all the windows and restart your computer.


There you have!

Thx guys.
Message 9 of 10
rich28
in reply to: Anonymous

I found mine wasn't working because I hadn't put a / at the end of the bin directory in the environment variables. Hope this helps anyone who like me has been trawling the internet for an answer to this
Message 10 of 10
Anonymous
in reply to: Anonymous

Hey guys, I kinda gave up on this thread after so long, I guess, but on the bright side, I did end up finding out what was wrong. Turns out that there were a couple of spaces in the directory path. Once those were replaced with underscores, the .bat file rendered as expected.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report