Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 18-06-2003, 03:39 PM   #1
filou
Registered User
 
Join Date: May 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!!
filou is offline   Reply With Quote
Old 24-06-2003, 02:38 AM   #2
BabyDuck
Subscriber
 
BabyDuck's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 1,170
Thanks: 3
Thanked 12 Times in 12 Posts
Default

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.
BabyDuck is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.