vray and -ard flag

Hi Ryan, please note that in vray for maya the -ard for the render.exe command controls the Pixel Aspect Ratio, instead of the device aspect ratio, tso this line should be remove from the mayaCmd.py

rendererArguments += BlankIfEitherIsBlank( " -ard ", GetPluginInfoEntryWithDefault( “AspectRatio”, “” ) )

… only in the if( self.Renderer == “vray” ): … of course :wink:

you should also remove the aspect ratio command in the mayaBatch plugin.

Also in the Mayabatch plugin I found a small error that prevent the tile renderng to work for Vray for maya:

In this line:
return '$batchDoRegion=1; setAttr defaultRenderGlobals.left ’ + self.Left + '; setAttr defaultRenderGlobals.rght ’ + self.Right + '; setAttr defaultRenderGlobals.bot ’ + self.Bottom + '; setAttr defaultRenderGlobals.top ’ + self.Top + ‘;’

simply add the global int $batchDoRegion; command at the start of the string.

To get this:
return 'global int $batchDoRegion;$batchDoRegion=1; setAttr defaultRenderGlobals.left ’ + self.Left + '; setAttr defaultRenderGlobals.rght ’ + self.Right + '; setAttr defaultRenderGlobals.bot ’ + self.Bottom + '; setAttr defaultRenderGlobals.top ’ + self.Top + ‘;’

Now the tiling works

cheers

Right Tiling works with that but there is missing pixels… looking into it

Hi Sylvain,

Thanks for the info! We’ll remove the -ard option from the vray command line, and we’ll also fix the submission script so that it doesn’t pass along that option when rendering with vray.

We’ll also update the mayabatch plugin with the tile rendering fix. If you happen to figure out why pixels are missing, let us know!

Cheers,

  • Ryan

Just realized we should also update our MayaBatch plugin so that it doesn’t set the pixel aspect ratio to the device aspect ratio. :slight_smile:

We’ll get that fixed too.

I have done a few blind modification to the tiling submission of a vray job. I didn’t try to figure out the maths, instead I simply added 1 here and there and it seems to work.

in the SetupRegionRenderingJob() function I did the following changes:

changed this:
if( $renderer == “vray” )
$height = $height - 1; // vray is very picky about the height. Not width for some reason.

To this
if( $renderer == “vray” )
$height = $height - 0; // vray is very picky about the height. Not width for some reason.

Removing the lines would also work :wink:

And changes this
if( $renderer == “mentalRay” )
$tempBottom++;
if( $renderer == “vray” )
$tempBottom = $tempBottom+2;

Like I said I don’t really understand mathematically why it works, but it seems to be ok. I still have to do more test rendering differents tiling values, but i’ll keep you posted

By the way there is a limitation in the mayaCmd with vray… it is not possible to render a render layer with vray, simply because the render.exe -r vray doesn’t accept the -rl flag.

I had to force the use of the mayaBatch plugin in my submitter when I detect that vray is used in a render layer… and of course add a function that scan all the render layers to get what rendered they use. I think Vlado will add that flag for the final release but as we speak it is not yet available