meMentalRayRender.py ver. 0.4.5
meVRayRender.py ver. 0.3.5
Sources are located at:
Now, both scripts have similar set of features and functionality:
- Maya's render layers support
- export compressed .mi (.vrscene) files
- deferred .mi (.vrscene) generation
- distributed rendering on render farm using Afanasy render manager
Export compressed .mi files
Due to unknown reason, Maya's documentation for Mayatomr MEL command does not mention any descriptions for -compressed option. But Maya's file exporter to mentalray format has a corresponding OptionMenu control with ability to choose compression level: 'Off', 'GzipBestSpeed', 'GzipDefault', 'GzipBest'.
So, this flag realy exists and works within Maya GUI.
But in case when someone tries to genereate compressed .mi files from command line e.g.:
Render -r mi -compressed 6 -binary 1 -file outfile.mi mayascene.maMaya will report the error ' -compressed is invalid flag '... Maya 2012, 2013 -- still are treating this flag as unsupported. It's very strange...
Fortunately I've found a nice tip at http://mayastation.typepad.com
You have to edit the file $MAYA_LOCATION/bin/rendererDesc/miRenderer.xml.
<sep desc="Export:"></sep>add the follwing line:
<mel h="Compression level: 0='Off', 1='GzipBestSpeed', 6='GzipDefault', 9='GzipBest' " n="compression" p="1" s="$opt +=" -compression %1"" t="int"> </mel>
Deferred .mi (.vrscene) generation
If you have $MAYA_LOCATION/bin/Render available in $PATH system environment variable on computers in your farm with 'mayatomr' or 'mayatovray' service enabled, now it's possible to generate .mi (.vrscene) on remote hosts. You can split sequence by tasks size parameter (e.g. 5 per host), and after each portion of files is finished, other hosts (with 'mentalray' or 'vray' service) will start to render them.
Here is example for mentalray afanasy job with deferred scene generation:
And VRay afanasy job with deferred scene generation:
Otherwise (with empty string), special keyword @AF_HOSTS@ will be added to command line, and hosts list will be dynamicaly replaced by Afanasy during rendering depending of available free hosts with corresponding service ('mentalray' or 'vray')
Mentalray distributed rendering job example:
VRay distributed rendering job example: