Terminal rendering in OS X?


#1

Hi,

I can’t get this thing to work. I looked at Maya help and tried this

cd /Applications/Autodesk/maya2011/Maya.app/Contents/bin/

Render -r mr /Users/Gloor/Documents/maya/projects/Short movie/scenes/beach.mb

but it says command not found. What am I missing here?


#2

Try supplying it all as one command rather than cd to the directory and then Render… So you would just have something like this on in your terminal;

/Applications/Autodesk/maya2011…/bin/Render -r mr -v 5 /path/to/your/mb/file

You could also look at adding an alias to your environment variables so you would only need to type Render -r mr and not the whole path to Render.


#3

You can just drag and drop your file instead of listing the directory,


#4

how could I do that? I switched to macs few years ago but didn’t play with terminal that much so I only remember the DOS commands from PC :))))


#5

ok, this is what i get :frowning:

/Applications/Autodesk/maya2011/Maya.app/Contents/bin/Render -r mr -v 5 /Users/Gloor/Documents/maya/projects/Short\ movie/scenes/beach.mb

Starting “/Applications/Autodesk/maya2011/Maya.app/Contents/bin/maya”

mental ray for Maya 2011
mental ray: version 3.8.1.26, Feb 7 2010, revision 110437
QWidget: Cannot create a QWidget when no GUI is being used
Stack trace:
4 libSystem.B.dylib 0x00007fff81db4886 __kill + 10
5 QtCore 0x0000000104a2ef05 qt_message_output(QtMsgType, char const*) + 117
6 QtCore 0x0000000104a2fa43 qFatal(char const*, …) + 243
7 QtGui 0x0000000104d42dec QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) + 764
8 QtGui 0x0000000104d43020 QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) + 96
9 QtGui 0x0000000105070cf8 QMenu::QMenu(QWidget*) + 72
10 maxwell.bundle 0x000000012a6627d4 __static_initialization_and_destruction_0(int, int) + 36
11 ??? 0x00007fff5fc0d500 0x0 + 140734799860992
12 ??? 0x00007fff5fc0bcec 0x0 + 140734799854828
13 ??? 0x00007fff5fc0bda6 0x0 + 140734799855014
14 ??? 0x00007fff5fc08fbb 0x0 + 140734799843259
15 libSystem.B.dylib 0x00007fff81d6c720 dlopen + 61
16 libFoundation.dylib 0x000000010080bb6e TdynamicLoad::open(char const*, TdynamicLoad::TdynamicLoadMode) + 558
17 libOpenMaya.dylib 0x0000000123af46c5 Tplugin::primaryLoad(Tstring const&, Tstring*) + 85
18 libOpenMaya.dylib 0x0000000123af4d32 Tplugin::load(Tstring const&, Tstring*) + 34
19 libOpenMaya.dylib 0x0000000123b466b9 TloadPluginAction::loadPlugin(TfilePath const&, Tstring const&, bool, Tstring&) + 2217
20 libOpenMaya.dylib 0x0000000123b479c1 TloadPluginAction::execute(TargList&) + 3553
21 libOpenMaya.dylib 0x0000000123b481ae TloadPluginAction::doCommand(TargList&) + 14
22 libCommandEngine.dylib 0x0000000100aa9279 Mel_Command_Dispatch(SphNode*) + 329
23 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
24 libCommandEngine.dylib 0x0000000100af8488 f_catch + 40
25 libCommandEngine.dylib 0x0000000100acc1d9 f_not + 25
26 libCommandEngine.dylib 0x0000000100af78e4 fc_if + 36
27 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
28 libCommandEngine.dylib 0x0000000100af7af2 fc_ifelse + 242
29 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
30 libCommandEngine.dylib 0x0000000100af96a5 f_function_entry_node + 2357
31 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
32 libCommandEngine.dylib 0x0000000100ad2afd sophia_call_executable + 109
33 libCommandEngine.dylib 0x0000000100af55fb SophiaExecutable::evaluate(void*) + 107


#6

Not too sure what’s going on there.
Try /Applications/Autodesk/maya2011/Maya.app/Contents/bin/Render -r mr -v 6 and hit return. Don’t put your mb file in, this will let you know if mental ray is installed correctly and loading all it’s libraries.

If you still get a qt error then it might be worth re-installing Maya. Basically the qt is for the gui so it’s odd that a command line render would be calling it.


#7

same result :frowning:

/Applications/Autodesk/maya2011/Maya.app/Contents/bin/Render -r mr -v 6 /Users/Gloor/Documents/maya/projects/Short\ movie/scenes/beach.mb

Starting “/Applications/Autodesk/maya2011/Maya.app/Contents/bin/maya”

mental ray for Maya 2011
mental ray: version 3.8.1.26, Feb 7 2010, revision 110437
QWidget: Cannot create a QWidget when no GUI is being used
Stack trace:
4 libSystem.B.dylib 0x00007fff81db4886 __kill + 10
5 QtCore 0x0000000104a2ef05 qt_message_output(QtMsgType, char const*) + 117
6 QtCore 0x0000000104a2fa43 qFatal(char const*, …) + 243
7 QtGui 0x0000000104d42dec QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) + 764
8 QtGui 0x0000000104d43020 QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) + 96
9 QtGui 0x0000000105070cf8 QMenu::QMenu(QWidget*) + 72
10 maxwell.bundle 0x000000012a8d47d4 __static_initialization_and_destruction_0(int, int) + 36
11 ??? 0x00007fff5fc0d500 0x0 + 140734799860992
12 ??? 0x00007fff5fc0bcec 0x0 + 140734799854828
13 ??? 0x00007fff5fc0bda6 0x0 + 140734799855014
14 ??? 0x00007fff5fc08fbb 0x0 + 140734799843259
15 libSystem.B.dylib 0x00007fff81d6c720 dlopen + 61
16 libFoundation.dylib 0x000000010080bb6e TdynamicLoad::open(char const*, TdynamicLoad::TdynamicLoadMode) + 558
17 libOpenMaya.dylib 0x0000000123cf46c5 Tplugin::primaryLoad(Tstring const&, Tstring*) + 85
18 libOpenMaya.dylib 0x0000000123cf4d32 Tplugin::load(Tstring const&, Tstring*) + 34
19 libOpenMaya.dylib 0x0000000123d466b9 TloadPluginAction::loadPlugin(TfilePath const&, Tstring const&, bool, Tstring&) + 2217
20 libOpenMaya.dylib 0x0000000123d479c1 TloadPluginAction::execute(TargList&) + 3553
21 libOpenMaya.dylib 0x0000000123d481ae TloadPluginAction::doCommand(TargList&) + 14
22 libCommandEngine.dylib 0x0000000100aa9279 Mel_Command_Dispatch(SphNode*) + 329
23 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
24 libCommandEngine.dylib 0x0000000100af8488 f_catch + 40
25 libCommandEngine.dylib 0x0000000100acc1d9 f_not + 25
26 libCommandEngine.dylib 0x0000000100af78e4 fc_if + 36
27 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
28 libCommandEngine.dylib 0x0000000100af7af2 fc_ifelse + 242
29 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
30 libCommandEngine.dylib 0x0000000100af96a5 f_function_entry_node + 2357
31 libCommandEngine.dylib 0x0000000100ad28b4 node_exec + 100
32 libCommandEngine.dylib 0x0000000100ad2afd sophia_call_executable + 109
33 libCommandEngine.dylib 0x0000000100af55fb SophiaExecutable::evaluate(void*) + 107


#8

I made a blog post since this tends to come up a lot:

http://polygonspixelsandpaint.tumblr.com/post/701899285/mac-maya-and-other-3d-app-users-how-to-set-up-cl


#9
/Applications/Autodesk/maya2011/Maya.app/Contents/bin/Render -r mr -v 6  /Users/Gloor/Documents/maya/projects/Short\ movie/scenes/beach.mb

Just a thought… does it have anything to do with that backslash after the word ‘Short’? Try removing it or making it a forward slash. ‘/’


#10

Check this out:

http://www.andrewandoru.com/2010/05/25/labs-renderq/


#11

no - that’s correct. That’s an escape character telling the terminal app to put a space there. A forward slash (/) means go down another level in the directories, which is not what you want. That’s not the problem though - I think the problem is with a plug-in he is using that is trying to load. I’ve seen it with betas of Maxwell for OS X and V-Ray nightly builds


#12

I tried that one. It didn’t work and gave me the same error so I thought it was the problem with the application but now that terminal is giving me the same error then I am confused and kinda don’t know how to solve it :frowning:


#13

reinstall maya - I think it’s a plug-in problem. Are you running hotfix 2?


#14

yes I am. I deleted maya and put hotfix 2 two days ago


#15

Ok, so I’ve reinstalled Maya and removed all plugins and now when I hit this

render -r mr -s 1 -e 1 -cam shot_cam -proj /Users/Gloor/Documents/maya/projects/Short movie/scenes/beach.mb

it goes fine but then it crashes. Any other ideas? :frowning:


#16

There are two problems there. The first is that you have a space in the folder name. You need to put a \ before that in the terminal (this is why you should never use spaces if you plan on doing anything in the terminal - use underscores for projects, files and folders). The second problem is the -proj part is the root folder for the project, not the scene file. The correct syntax is:

render -r mr -s 1 -e 1 -cam shot_cam -proj /Users/Gloor/Documents/maya/projects/Short\ movie ~/Documents/maya/projects/Short\ movie/scenes/beach.mb

The space between movie and Documents is indicating that the -proj part has ended and the scene file path is starting.


#17

Well, this is what happens when i do the last command

render -r mr -s 1 -e 1 -cam shot_cam -proj /Users/Gloor/Documents/maya/projects/Short movie/scenes/beach.mb

Starting “/Applications/Autodesk/maya2011/Maya.app/Contents/MacOS/maya”

mental ray for Maya 2011
mental ray: version 3.8.1.26, Feb 7 2010, revision 110437
QWidget: Cannot create a QWidget when no GUI is being used
Stack trace:
4 libSystem.B.dylib 0x00007fff813bc3d6 __kill + 10
5 QtCore 0x000000010580df05 qt_message_output(QtMsgType, char const*) + 117
6 QtCore 0x000000010580ea43 qFatal(char const*, …) + 243
7 QtGui 0x0000000105b21dec QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) + 764
8 QtGui 0x0000000105b22020 QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) + 96
9 QtGui 0x0000000105e4fcf8 QMenu::QMenu(QWidget*) + 72
10 maxwell.bundle 0x000000012b2247d4 __static_initialization_and_destruction_0(int, int) + 36
11 ??? 0x00007fff5fc0d500 0x0 + 140734799860992
12 ??? 0x00007fff5fc0bcec 0x0 + 140734799854828
13 ??? 0x00007fff5fc0bda6 0x0 + 140734799855014
14 ??? 0x00007fff5fc08fbb 0x0 + 140734799843259
15 libSystem.B.dylib 0x00007fff813742c0 dlopen + 61
16 libFoundation.dylib 0x0000000100839b6e TdynamicLoad::open(char const*, TdynamicLoad::TdynamicLoadMode) + 558
17 libOpenMaya.dylib 0x0000000122df46c5 Tplugin::primaryLoad(Tstring const&, Tstring*) + 85
18 libOpenMaya.dylib 0x0000000122df4d32 Tplugin::load(Tstring const&, Tstring*) + 34
19 libOpenMaya.dylib 0x0000000122e466b9 TloadPluginAction::loadPlugin(TfilePath const&, Tstring const&, bool, Tstring&) + 2217
20 libOpenMaya.dylib 0x0000000122e479c1 TloadPluginAction::execute(TargList&) + 3553
21 libOpenMaya.dylib 0x0000000122e481ae TloadPluginAction::doCommand(TargList&) + 14
22 libCommandEngine.dylib 0x0000000100b392e1 TpythonInterpreter::dispatchMayaCommand(TmetaCommand&, _object*, _object*) + 401
23 Python 0x0000000106bbfbc8 PyEval_EvalFrameEx + 23208
24 Python 0x0000000106bc174b PyEval_EvalCodeEx + 1483
25 Python 0x0000000106bc1b46 PyEval_EvalCode + 54
26 libCommandEngine.dylib 0x0000000100b3b354 TpythonInterpreter::executeCommand(Tstring const&, bool, bool, TinterpreterResult*) + 548
27 libShared.dylib 0x0000000102fe55fb TrequiresCmd::parseArgs(TargList&) + 1323
28 libShared.dylib 0x0000000102fe5ae1 TrequiresCmd::doIt(TargList&) + 17
29 libCommandEngine.dylib 0x0000000100ad7f2a TmetaCommand::doCommand(TargList&) + 90
30 libCommandEngine.dylib 0x0000000100ad7279 Mel_Command_Dispatch(SphNode*) + 329
31 libCommandEngine.dylib 0x0000000100b008b4 node_exec + 100
32 libCommandEngine.dylib 0x0000000100b00afd sophia_call_executable + 109
33 libCommandEngine.dylib 0x0000000100b235fb SophiaExecutable::evaluate(void*) + 107

Writing crash report in /var/folders/zs/zs+SzYLGFcqbT8EgTz6SUE+++TI/-Tmp-/Gloor.20100624.2308.crash


#18

and this when i try yours

render -r mr -s 1 -e 1 -cam shot_cam -proj /Users/Gloor/Documents/maya/projects/Short\ movie Documents/maya/projects/Short movie/scenes/beach.mb
More than one file name is not allowed: movie/scenes/beach.mb …


#19

funny thing is that I tried to use renderQ which actually asks you to navigate it and should do everything for you but that crashes too


#20

oops - I was still mising the second \ escape character and the path to Documents.

render -r mr -s 1 -e 1 -cam shot_cam -proj /Users/Gloor/Documents/maya/projects/Short\ movie /Users/Gloor/Documents/maya/projects/Short\ movie/scenes/beach.mb

Don’t bother typing the full path - just type the command part and drag the folder from the Finder to get the path or drag the doc in from Maya:

http://dl.dropbox.com/u/7990437/renderdoctrick.mov