Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 18-06-2003 , 02:39 PM
Registered User
Join Date: May 2003
Posts: 25

rendering sub regions with mr

get a scriptt wich allows to render,different regions with Maya renderer:




global proc get_RenderRegions( int $x_res, int $y_res,
int $x_reg, int $y_reg,
string $image, string $file )
{
int $x_step = floor( (float)$x_res/(float)$x_reg );
int $y_step = floor( (float)$y_res/(float)$y_reg );

if( $x_res % 2 != 0 ) {
error( "X resolution must be even" );
}
if( $y_res % 2 != 0 ) {
error( "Y resolution must be even" );
}

int $x, $y;
int $image_index = 0;
for( $x=0; $x<$x_res; $x+=$x_step )
{
for( $y=0; $y<$y_res; $y+=$y_step )
{
string $command = "Render";
$command += " -x "+$x_res+" -y "+$y_res;
$command += " -xl "+$x+" -xr "+($x+$x_step-1);
$command += " -yl "+$y+" -yh "+($y+$y_step-1);
$command += " -im "+$image+"_"+$image_index;
$command += " "+$file;

print( $command+"\n" );

$image_index++;
}
}
}

Then, i type for instance:

get_RenderRegions( 6000, 6000, 3, 3, "pane", "C:\\temp\\balls.mb" );


Maya script editor,then give 9 lignes ,as following:

Render -x 6000 -y 6000 -xl 0 -xr 1999 -yl 0 -yh 1999 -im pane_0 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 0 -xr 1999 -yl 2000 -yh 3999 -im pane_1 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 0 -xr 1999 -yl 4000 -yh 5999 -im pane_2 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 2000 -xr 3999 -yl 0 -yh 1999 -im pane_3 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 2000 -xr 3999 -yl 2000 -yh 3999 -im pane_4 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 2000 -xr 3999 -yl 4000 -yh 5999 -im pane_5 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 4000 -xr 5999 -yl 0 -yh 1999 -im pane_6 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 4000 -xr 5999 -yl 2000 -yh 3999 -im pane_7 C:\temp\balls.mb
Render -x 6000 -y 6000 -xl 4000 -xr 5999 -yl 4000 -yh 5999 -im pane_8 C:\temp\balls.mb


So ,in DOS prompt ,i type each lines, & each images are calculated;

THIS PROCESS WORks ,as long as, Mental ray, is not concerned!

What could be ,the"equivalent" of this all process,FOR MENTAL RAY?
Ineed that for ray-trace & caustics ,GI ,mental ray computed)
Please help!
If i do the same process,with a file saved with MR renderer;(instead, the file name,is verre:included ray-trace & caustics with MR),,

i got this:

C:\Documents and Settings\filou>Render -x 6000 -y 6000 -xl 0 -xr 1999 -yl 0 -yh 1999 -im pane_0 C:\temp\verre.mb
Maya (R),
Copyright 1997-2003 Alias|Wavefront, a division of Silicon Graphics Limited.
All rights reserved.
Error: line 1: initializePlugin function failed (Mayatomr)
Warning: line 1: Unrecognized node type for node 'mentalrayItemsList'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'mentalrayGlobals'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'Draft'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'DraftMotionBlur'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'Preview'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'PreviewMotionblur'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'PreviewCaustics'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'PreviewGlobalIllum'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'PreviewFinalgather'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'Production'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'ProductionMotionblur'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'miDefaultOptions'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'miDefaultFramebuffer'; preserving node information during this session.
Warning: line 1: Unrecognized node type for node 'PreviewFinalGather'; preserving node information during this session.




I read,in rendering with Mr, that Mr ,also,permits to render subregions , with:

-xl, -xr ,-yl,-yh


Please, need help!!

# 2 24-06-2003 , 01:38 AM
BabyDuck's Avatar
Subscriber
Join Date: Nov 2002
Location: USA
Posts: 1,170
not sure how to fix that, but if you start the batch render from inside maya, the error messages do not appear. maybe that is only an issue with 4.5 - i do not know if the mr in 5.0 allows rendering w/o having maya open.

but then if you start it within maya, you cannot use your script.

Posting Rules Forum Rules
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

Similar Threads