shot2.rar (144.6 KB, 1617 views)
#
8
07-01-2011
, 05:26 PM
Registered User
Join Date: Jan 2011
Location: Austin TX / Los Angeles CA
We've had similar problems on our short film. One thing to look out for is that if you have some referenced and instanced objects you may need to import the references into your scene for Batch rendering to work. We had some referenced clouds instanced across the scene that didn't show up in batch render until we imported the reference. Very odd but it's a work around.
#
9
09-01-2011
, 04:22 PM
Registered User
Join Date: Jan 2011
adjusting the render script
Hi,
I tried your script- it works fantastic!
Is there anyway to make it work with mental ray as the rendering engine?
I cant figure out where or what to adjust.
Many thanks
a
I haven't tested this as I don't have Maya installed on this machine, but it should work without problems.
Open up your script editor, and change the first 4 lines to your requirements.
Filename is used for something like "render.001.jpg"
Camera, is the camera you want to render out of
Start and end frame are self-explanatory.
If you have problems setting this up, just give me your requirements, and I'll do the changes for you.
Code:
string $filename = "render";
string $cameraName = "persp";
int $startFrame = 1;
int $endFrame = 24;
string $directory = (`workspace -q -rd` + "images/");
for ($i = $startFrame; $i <= ($endFrame - $startFrame); $i++)
{
currentTime $i;
render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName;
string $concatFilename = $directory + $filename + "." + $i;
renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`);
print ("Saved " + $concatFilename + "\n");
}
print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n");
Hope this helps guys.[/QUOTE]
#
10
13-01-2011
, 10:07 PM
Registered User
Join Date: Jan 2011
Glad to helps guys. 
You don't know how nice it is to have a request that is fully described, and asked for nicely. It really makes the difference
Hi there,
Im hoping you can tell me how to revise your script so that it calls on the Mental ray engine instead of the Maya software.
I am using Maya 2009 and the render view & globals are set to MR.
Any help would be so very appreciated.
Best,
a
#
11
14-01-2011
, 07:04 AM
Technical Director
Join Date: Feb 2004
Wow, it seems this script has attracted quite a bit of attention 
Here is a fixed version that will allow rendering in multiple renderers, as well as work in Maya 2011!
Code:
// Batch rendering workaround - John Mather (NextDesign)
string $filename = "render";
string $cameraName = "persp";
int $startFrame = 1;
int $endFrame = 3;
string $directory = (`workspace -q -rd` + "images/");
for ($i = $startFrame; $i <= $endFrame; $i++)
{
currentTime $i;
// Old version
// render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName;
// New version - supports MR and other renderers!
renderWindowRender redoPreviousRender renderView;
string $concatFilename = $directory + $filename + "." + $i;
if (`getApplicationVersionAsFloat` >= 2011)
// Thanks to nowayfra on creativecrash for his workaround
catch(eval(renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`)));
else
renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`);
print ("Saved " + $concatFilename + "\n");
}
print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n");
P.s. Many thanks goes out to nowayfra on CreativeCrash for his Maya 2011 fix! (https://www.creativecrash.com/forums/...on_post_306312)
Edit: Fixed a small bug that would stop all frames from being rendered.
Imagination is more important than knowledge.
Last edited by NextDesign; 24-01-2011 at 01:14 AM.
#
12
14-01-2011
, 07:57 AM
Lifetime Member
Join Date: Feb 2010
Location: Australia
ND you are a bloody champignon mate...kudos to you for the help with these problems..
cheers bullet
bullet1968
"A Darkness at Sethanon", a book I aspire to model some of the charcters and scenes
#
13
14-01-2011
, 10:18 AM
Registered User
Join Date: Jan 2011
u r great...man.
it really works great.
it will avoid many internal errors during batch render.
#
14
17-02-2011
, 11:45 PM
Registered User
Join Date: Feb 2011
Hey I am having a similar problem with my batchrender. This script could really come in handy but whenever I try and run it I am also having an error. If someone could help out I would be very grateful.
the error is ( // Error: renderWindowEditor: Object 'renderView' not found)
I am trying to render in Mental Ray out of a camera I have set up. anyone know what is causing that error?
maybe I am just filling in something in the first 4 lines incorrectly ...
#
15
22-02-2011
, 01:31 PM
Subscriber
Join Date: Nov 2002
Location: USA
Awesome script ND. 2 little things - just tested in maya 2011 and I get before each render this error:
Code:
# Error: AttributeError: ImageFormats instance has no attribute 'oldOutf' #
Not a deal breaker since the render does work w/o problems.
And also the last line should read
Code:
print ("Completed rendering of " + ($endFrame - $startFrame + 1 ) + " frames.\n");
otherwise it is saying completed one less render than it actually did (not really an issue, just a nitpick.
And I noticed if the files already exists it will ask each time if you want to overwrite it - nice feature, but might be annoying if you got a lot to render - so if you do, just delete the files beforehand.
You may not post new threads |
You may not post replies |
You may not post attachments |
You may not edit your posts |
BB code is On |
Smilies are On |
[IMG] code is On |
HTML code is Off
|