CGTalk > Software > Autodesk Maya > Maya Rendering
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 02-05-2004, 02:22 PM   #1
rollmops
padawan 4 ever
 
rollmops's Avatar
portfolio
Roland Franck
shading compositing & effect
nWave digital
Belgium
 
Join Date: May 2002
Posts: 519
mentalrayGlobals.preRenderMel

Hi,

Does anyone knows how to set an outputpath for mentalray?

This script is maybe missing something:
setAttr mentalrayGlobals.outputPath -type "string" "Y:/house/line_test/INTRO/RIGHT";


Thanx a lot.
__________________
.::We only have 2 limits:
+ time
+ imagination
::.
 
Old 02-05-2004, 09:38 PM   #2
Emmortal1
I am Unoriginal
 
Emmortal1's Avatar
Bill Spradlin
USA
 
Join Date: Oct 2003
Posts: 626
Shouldn't it be this? Not positive though as I'm not a MEL master by any means.

"Y:\\house\\line_test\\INTRO\\RIGHT";

Emmortal
 
Old 02-06-2004, 08:54 AM   #3
rollmops
padawan 4 ever
 
rollmops's Avatar
portfolio
Roland Franck
shading compositing & effect
nWave digital
Belgium
 
Join Date: May 2002
Posts: 519
Thanx Emmortal,

But it doesn't work either.
In fact I'm wondering if the prerenderMel has any effect. Even a stupid print "text" doesn't work.
__________________
.::We only have 2 limits:
+ time
+ imagination
::.
 
Old 02-06-2004, 09:10 AM   #4
rollmops
padawan 4 ever
 
rollmops's Avatar
portfolio
Roland Franck
shading compositing & effect
nWave digital
Belgium
 
Join Date: May 2002
Posts: 519
Thanx Emmortal,

But it doesn't work either.
In fact I'm wondering if the prerenderMel has any effect. Even a stupid print "text" doesn't work.
__________________
.::We only have 2 limits:
+ time
+ imagination
::.
 
Old 02-06-2004, 01:10 PM   #5
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,389
I will assume you are attempting command line renders.

To render frames 1 to 25 to d:\myImages you need to create a mel script called mrStart.mel (but the name isnt important).

global proc mrStart()
{
setAttr "mentalrayGlobals.startFrame" 1;
setAttr "mentalrayGlobals.endFrame" 25;
setAttr mentalrayGlobals.outputPath -type "string" d:/myImages;
mrBatchRender_v5;
}

Then launch the render from the commandline using...

mayabatch -file sceneFile -proj projectPath -command mrStart

(obviously substituting sceneFile and projectPath with your name and path)

You can override many of the other render globals in the same way, but there are some quirky things. For example the output folder specified above will be ignored unless you also edit mrBatchRender_v5.mel and change the line

string $imageDir = miSetImageDir();

to

string $imageDir = "";



(mrBatchRender_v5.mel is part of the maya installation, provided as a way of launching a commandline mentalray for maya render)

If you get this far, then its not much extra to use some scripting to generate the mrStart.mel automatically. I have it set up so that I just type "mr sceneName 1 25" at the command prompt and the output folder gets created and the render invoked. I can pass on the details if you are interested.
 
Old 02-06-2004, 02:44 PM   #6
rollmops
padawan 4 ever
 
rollmops's Avatar
portfolio
Roland Franck
shading compositing & effect
nWave digital
Belgium
 
Join Date: May 2002
Posts: 519
Thumbs down

Yes!
Cool! For the first time maya reads the mel, with this lines.
global proc mrStart()
{
setAttr "mentalrayGlobals.startFrame" 1;
setAttr "mentalrayGlobals.endFrame" 5;
setAttr mentalrayGlobals.outputPath -type "string" "Y:/house/line_test/INTRO/RIGHT";
mrBatchRender_v5;
}


But
rendered pictures allways come to my proj/mentalRay/images/
__________________
.::We only have 2 limits:
+ time
+ imagination
::.

Last edited by rollmops : 02-06-2004 at 02:47 PM.
 
Old 02-07-2004, 01:26 PM   #7
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,389
You are almost there.
You need to track down and edit mrBatchRender_v5.mel
(usually in C:\Program Files\AliasWavefront\Maya5.0\scripts\others)

and change the line

string $imageDir = miSetImageDir();

to

string $imageDir = "";


(This `miSetImageDir()` resets your mentalrayGlobals.outputPath back to what ever was set in your project file paths - which is not what we want here).
 
Old 02-07-2004, 09:32 PM   #8
MDurante
Veteran
Matthew Durante
USA
 
Join Date: Sep 2003
Posts: 87
Just do:
workspace -rt images $rd;

Where $rd is the render directory. It has worked for me in all instances, though perhaps it is not bulletproof.

- Matthew Durante
 
Old 02-08-2004, 10:52 PM   #9
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,389
I think that "workspace -rt images $rd;" only works for batch renders launched from within maya interactive. I cant get it to work as part of a start-up script for a command-line render.
 
Old 02-08-2004, 11:49 PM   #10
MDurante
Veteran
Matthew Durante
USA
 
Join Date: Sep 2003
Posts: 87
No, it works from outside of maya. Check out:
http://www.cgtalk.com/showthread.php?s=&threadid=94005

I've been using variants of this for awhile without problems, though honestly not lately. The version I use is plugged into a network rendering system but it's nearly the same code.

- Matthew Durante
 
Old 01-17-2006, 09:00 AM   #11
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:03 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.