PDA

View Full Version : Rendering subregions with MR!


liviaphil
06-18-2003, 03:44 PM
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!!

Mangalore
06-18-2003, 03:59 PM
Not sure if that's all but this error

"Error: line 1: initializePlugin function failed (Mayatomr) "

means that the Mental Ray plugin couldn't be loaded. The following errors indicate that he cannot interpret Nodes associated with MR. But I fear I cannot tell why the plugin is not loaded in this case. Does MR usually work?

liviaphil
06-18-2003, 11:26 PM
txs for replying

was wondering if:
Maya2mr can do that?
do i need "properr " mental ray soft,to rendersubwindows;
i read that,s possible from rendering with mr from driemeyer!


yes, usually, mr works fine within maya
reguards!

CGTalk Moderation
01-15-2006, 09:00 AM
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.