SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / rendering sub regions with mr
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 18-06-2003, 02: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, 01: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
New Thread

« Previous Thread | Next Thread »

Thread Tools

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

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.