This page provides information on batch rendering with V-Ray for Maya.

 

Page Contents

 

Overview


V-Ray can take advantage of Maya's ability to render scenes directly from a command line, freeing up the resources that would normally be used up by the application and its GUI. Also, this process allows multiple scenes to be grouped together and rendered one after the other, without having to load scenes in between renders. For more general information on rendering with Maya from a command line, please see the Autodesk Maya documentation. Flags can be added to the execution of the command to customize the way V-Ray renders the desired scene. V-Ray will respect common Maya flags as well as a host of V-Ray specific flags detailed on this page.

 

Maya Command


The Maya command used for this process is Render.exe and can be executed from a command prompt or terminal window.

"C:\Program Files\Autodesk\Maya####\bin\Render.exe" -flag <argument>

 

For example, to print out the help information for V-Ray in the render command, type

"C:\Program Files\Autodesk\Maya2018\bin\Render.exe" -r vray -h

 

Command Flags


Below is a list of available options. Note the following about these commands:

  • Arguments listed as Boolean can only receive true/false values. These options turn a feature on (true) or off (false). Acceptable values for true/false are 0/ 1, on/ off, yes/ no and true/ false.
  • Remember that float values include a decimal while integers do not. This means that integers can be used when a float is required, but float values cannot be used where integers are required.
  • String values must be enclosed in double quotes.
  • Available values from enumerated lists are presented with a pipe (|) separator. For example, 0 | 1 | 2 means the argument value can only be a 0, 1, or 2. String values of this argument type are input with quote marks.
  • Options with Set/Get will return the current values for the parameter when used without arguments.
  • The name of the Maya scene file should always be the last argument passed to the command line. For example, Render -r vray [options] <mayaSceneFile>.

 

All Purpose Options

 FlagDescriptionExample
-exportFileName <string>Use this to force exporting to a .vrscene file with the given name.Render -r vray -exportFileName "C:\1.vrscene" <mayaSceneFile>
-noRenderUse this to disable rendering. Usually it is used with -exportFileName to produce a.vrscene file. The flag requires no arguments.Render -r vray -exportFileName "C:\1.vrscene" -noRender <mayaSceneFile>
-exportSeparateUse this to export to separate .vrscene files. The flag requires no arguments.Render -r vray -exportFileName "C:\1.vrscene" -noRender -exportSeparate <mayaSceneFile>
-exportCompressedUse this to export to compressed .vrscene file. The flag requires no arguments.Render -r vray -exportFileName "C:\1.vrscene" -noRender -exportCompressed <mayaSceneFile>
-exportFramesSeparateUse this to export each frame to separate file. The flag requires no arguments.Render -r vray -exportFileName "C:\1.vrscene" -noRender -s 1 -e 10 -exportFramesSeparate <mayaSceneFile>
-exportSpecific <string>Use this to restrict the exporter to a list of (DAG) nodes.Render -r vray -exportFileName "C:\1.vrscene" -exportSpecific "pSphereShape1 pSphereShape2 pPlane1" <mayaSceneFile>

 

General Maya Options

FlagDescriptionExample
-rd <path>Directory in which to store image fileRender -r vray -rd "C:\images" <mayaSceneFile>
-of <string>Output image file format.Render -r vray -of "png" <mayaSceneFile>
-im <filename>Image file output nameRender -r vray -im "myRenderedImage" <mayaSceneFile>
-rep <boolean>Replace or not the rendered image if it already existsRender -r vray -rep 0 <mayaSceneFile>

 

Frame Numbering Options

FlagDescriptionExample
-s <float>Starting frame for an animation sequenceRender -r vray -s 1 -e 10 <mayaSceneFile>
-e <float>End frame for an animation sequenceRender -r vray -s 1 -e 10 <mayaSceneFile>
-b <float>By frame (or step) for an animation sequenceRender -r vray -s 1 -e 10 -b 1 <mayaSceneFile>
-pad <int>Number of digits for the frame number in the output image file nameRender -r vray -s 1 -e 10 -b 1 -pad 4 <mayaSceneFile>

 

Camera Options

FlagDescriptionExample
-cam <name>Specify which camera to be renderedRender -r vray -cam "camera1" <mayaSceneFile>
-iip Ignore image planes when rendering. The flag requires no arguments.Render -r vray -iip <mayaSceneFile>

 

Bake Rendering Options

FlagDescriptionExample
-bake_node <name >Specify object to bake renderRender -r vray -bake_node pSphere1 <mayaSceneFile>
-bake_map <name >Which UV set to useRender -r vray - bake_node pSphere 1 -bake_map map1 <mayaSceneFile>
-bake_padding <float >Edge padding in pixelsRender -r vray - bake_node pSphere 1 -bake_map map1 -bake_padding 2 <mayaSceneFile>

 

Resolution Options

FlagDescriptionExample
-reg <int int int int>Set a region for the render where the four int values are x x y y based on the bottom left side of the imageRender -r vray -reg 0 500 0 500 <mayaSceneFile>
-regrel <float> <float> <float> <float>Sets the sub-region pixel boundary of the final image, relative to image resolution: left, right, bottom, topRender -r vray -regrel 0.0 0.5 1.0 0.0 <mayaSceneFile>
-x <int>Set X resolution of the final imageRender -r vray -x 1920 -y 1080 <mayaSceneFile>
-y <filename>Set Y resolution of the final imageRender -r vray -x 1920 -y 1080 <mayaSceneFile>
-par <float>Pixel Aspect Ratio for the rendered image

Render -r vray -par 1 <mayaSceneFile>

-percentRes <float>Renders the image using the specified percent of the resolutionRender -r vray -percentRes 50 <mayaSceneFile>

 

System Options

FlagDescriptionExample
-threads <int>Specify how many render threads to use (0-auto)Render -r vray -threads 2 <mayaSceneFile>

 

Render Layers and Passes Options

FlagDescriptionExample
-rl <name(s)>Render each render layer separatelyRender -r vray -rl "masterLayer" <mayaSceneFile>

 

MEL callbacks Options

FlagDescription
-preRender <string>Mel code executed before rendering
-postRender <string>Mel code executed after rendering
-preLayer <string>Mel code executed before each render layer
-postLayer <string>Mel code executed after each render layer
-preFrame <string>Mel code executed before each frame
-postFrame <string>Mel code executed after each frame

 

 

Notes  


  • Any boolean flag will take the following values as TRUE: on, yes, true, or 1.

  • Any boolean flag will take the following values as FALSE: off, no, false, or 0.