Rendering variables

AW_JPEG_Q_FACTOR

This variable can be used to specify the quality of JPEG files that Maya renders out. The valid values are 1 through 100, with 100 being the highest quality. The default is 100.

AW_JPEG_SUB_SAMPLING

Allows you to control the subsampling quality of the rendered image.

The value of the AW_JPEG_SUB_SAMPLING environment variable is:

L1xL2,Ch1xCh2,Gr1xGr2

where:

A few possible settings for this environment variable are as follows:

For example:

The values for each of the L1xL2, Ch1xCh2, and Gr1xGr2 components can be between 1 and 4, where 1x1 is of the highest quality. In general, the lower the component value, the better the quality of the final JPEG because a smaller sampling block allows better high-frequency color information to be captured.

Tip:

To achieve high visual quality, the environment variable AW_JPEG_Q_FACTOR should also be set to “100”. This variable controls the overall quality of the image, which may mask out any settings to AW_JPEG_SUB_SAMPLING.

MAYA_COLOR_MANAGEMENT_POLICY_FILE

Set this to the full path and file name of a policy (external color management preferences file) to load when you launch Maya. If MAYA_COLOR_MANAGEMENT_POLICY_LOCK is set to 0 or unset, then you can still modify color management preferences and update or export the settings. You can also load a different policy, or even clear the path to unload the policy. The new settings are used for the current session, but the policy specified by the environment variable will be applied again when you relaunch Maya. See Use color management policies (external preference files).

MAYA_COLOR_MANAGEMENT_POLICY_LOCK

Set this to 1 to prevent the color management preferences from being modified (except to toggle the display of color-managed pots or to disable color management in the current scene) when MAYA_COLOR_MANAGEMENT_POLICY_FILE is set to a valid external color management preferences file. Set it to 0 or unset it to unlock the color management preferences.

MAYA_ENABLE_LEGACY_VIEWPORT

Lets you access Maya's Legacy Viewport. See Maya Legacy Viewport for related settings.

MAYA_NO_JITTER_FINAL_COLOR

If you are quantizing to 8-bit color, we apply some randomness, or jitter, to the color. To enable this option, set the value equal to 1. To disable it, set the value to 0 (zero) or leave it undefined.

MAYA_RENDERER_RT_BACKGROUND_COLOR

If you set this variable to 1, Maya includes the camera background in the calculation of reflection and refraction rays. If you set this variable to 0 (zero) or leave it undefined, Maya ignores the background color for these rays.

MAYA_HW_FILE_TEXTURE_RESOLUTION_OVERRIDE

Enable this flag to force baked file textures to be the maximum of the texture resolution attribute on the file texture or the actual file texture dimensions.

MAYA_OFFSCREEN_HRB

Set this flag to 1 to expose the Render Offscreen option in the Hardware Render Buffer > Render menu. When enabled, an offscreen buffer is used when rendering sequences using the Hardware Render Buffer. Single-frame renders will continue to be rendered into an on-screen buffer. During offscreen rendering, moving windows over the Hardware Render Buffer window does not affect the rendered frames, as would normally be the case.

Note:

The Render Offscreen option is only supported on Linux and Mac OS X and not Windows.

MAYA_EXR_LONGNAME

EXR version 1.7 supports 252 character channel names. The limit is 252 and not 255 to save room for an extension of up to 3 characters used to differentiate individual channels (for example .R for the red channel). However, EXR version 1.7 is currently supported by very few external applications (for example, Flame), and embedding channel names longer than 31 characters may break compatibility with external applications that do not support it. By default, channel names are truncated to 31 characters for backward compatibility. Set this to 1 to allow long channel names so that channel names are not truncated.

MAYA_TEXCOORD_ORIENTATION

Set this environment variable to either OPENGL or DIRECTX to define the MAYA_TEXCOORD_ORIENTATION_OPENGL or MAYA_TEXCOORD_ORIENTATION_DIRECTX macros respectively. When the macro is defined, it is set to 1.

By setting this environment variable, when the CgFx plug-in compiles a CgFX shader, the shader is compiled with the MAYA_TEXCOORD_ORIENTATION_OPENGL macro or MAYA_TEXCOORD_ORIENTATION_DIRECTX macro set to 1, and the texture is loaded using the orientation (OpenGL or DirectX) you specified. See Orientation of the texture co-ordinate system for CgFX shaders for more information.

MAYA_QUICKTIME_ENCODING_GAMMA

You can customize the gamma used for encoding Quicktime playblast by setting the environment variable MAYA_QUICKTIME_ENCODING_GAMMA to the desired gamma. If this environment variable is not set, the default value is 2.2.

MAYA_VP2_DEVICE_OVERRIDE

Use this environment variable to select the rendering engine with which to run Viewport 2.0. When set, this environment variable overrides the user preference (Window > Settings/Preferences > Preferences > Display) for both interactive and batch sessions (using the -hw2 option).

Set this environment variable as follows:

  • VirtualDeviceDx11 to render Viewport 2.0 in DirectX 11 mode
  • VirtualDeviceGL to render Viewport 2.0 in OpenGL - Legacy mode
  • VirtualDeviceGLCore to render in OpenGL - Core Profile (Strict) mode
  • VirtualDeviceGLCoreCompat to render in OpenGL - Core Profile (Compatibility) mode.

Unset this environment variable to use the user preference again to select your rendering engine.

Note:

This environment variable is not supported when accessing Maya through Windows Remote Desktop, unless you have an Nvidia GeForce or Quadro graphics card. Maya automatically switches the Viewport 2.0 Rendering engine to DirectX 11 mode for the remote session. The render.exe command also uses the DirectX 11 mode. See Using DirectX 11 with Viewport 2.0 for more information about running Viewport 2.0 in DirectX 11 mode.

If you have an Nvidia GeForce graphics card and you want to use OpenGL - Core Profile mode (either Strict or Compatibility), you can download a tool from Nvidia that enables Windows Remote Desktop streaming of OpenGL applications with GeForce drivers R440 or later. To use this tool, set the environment variable MAYA_ALLOW_OPENGL_REMOTE_SESSION=1.

If you have an Nvidia Quadro graphics card, you only need to set the MAYA_ALLOW_OPENGL_REMOTE_SESSION environment variable, and the Nvidia tool is not required.

MAYA_ALLOW_OPENGL_REMOTE_SESSION

To run Viewport 2.0 in OpenGL - Core Profile (Strict) or OpenGL - Core Profile (Compatibility) mode on a remote desktop, set this environment variable to 1. This feature is supported for Nvidia GeForce and Nvidia Quadro graphics cards.

For Nvidia GeForce cards, you need to download a tool from Nvidia that enables Windows Remote Desktop streaming of OpenGL applications with GeForce drivers R440 or later.

For Nvidia Quadro cards, you only need to set this environment variable.

MAYA_VP2_USE_LINEAR_NC_SPACE_DEPTH_PRIORITY

By default, Maya uses an algorithm for determining depth priority (that is, deciding which UI elements draw on top of another). This algorithm scales linearly in clip space and provides more accurate results when the near clip distance is small. You can revert back to the legacy (NDC) depth priority algorithm by setting this environment variable to 1.

MAYA_VP2_OFF_NON_PE_FRAGMENT

If your motion blur has no effect when an image plane is immediately behind a moving object, you can workaround this issue by setting the MAYA_VP2_OFF_NON_PE_FRAGMENT environment variable to 1. Setting this environment variable allows the image plane to be included in the calculations of all scene post effects, such as screen space ambient occlusion, depth of field and motion blur.

MAYA_FORCE_DX_DEBUG_DEVICE

This environment variable enables you to debug graphics card issues during development of plug-ins for Viewport 2.0. You must also install the DirectX SDK to use this functionality. Set MAYA_FORCE_DX_DEBUG_DEVICE to 1 so that, when using DirectX mode in Viewport 2.0, the DirectX device is created with the D3D11_CREATE_DEVICE_DEBUG flag enabled.

MAYA_OBJECT_SORT_USING_BOUNDING_BOX

Maya uses an algorithm for the Object Sorting transparency option (Renderer > Viewport 2.0 > ) that provides more accurate results. To revert to the legacy (Maya 2013) Object Sorting algorithm, set MAYA_OBJECT_SORT_USING_BOUNDING_BOX = 1.

MAYA_GPUCACHE_VP2_OVERRIDE_API

This environment variable determines the API that is used by the gpuCache plug-in to drive Viewport 2.0. By default, this is set to MPxSubSceneOverride. This is the only value that is supported.

When this environment variable is not set, the MPxSubSceneOverride API is used.

This variable can also be set to MPxDrawOverride, but this option is only provided as a Developer Kit example of how to use the MPxDrawOverride API. It does not support screen space effects such as screen space ambient occlusion, motion blur, transparency sorting, and per-pixel lighting.

MAYA_FORCE_DX_WARP

Set the environment variable MAYA_FORCE_DX_WARP to 1 in order to always use the WARP software rasterizer.

The use of WARP is indicated in the output window when the renderer is first used.

In addition, the heads-up display, which indicates the current renderer, also indicates that WARP is being used.

WARP denotes Windows Advanced Rasterization Platform. Refer to the documentation from Microsoft for more details.

Note: WARP may not support the full set of features that a hardware rasterizer supports. This is more noticeable with the Windows 7 platform than with the Windows 8 platform. WARP is currently not a qualified configuration.
MAYA_OGS_GPU_MEMORY_LIMIT

When working simultaneously on Maya and another 3d application, you can set the Viewport 2.0 memory limit to a lower value, reserving memory for the alternative 3d program. Set this environment variable to the memory limit in number of MB. For example, to limit Viewport 2.0 on a 2GB card to use only 1GB, set this environment variable to 1024. The output window confirms that the memory limit has been artificially set.

This may improve performance in the instances where you are running a 3d application simultaneously, but it decreases performance otherwise, and therefore should be used with caution.

MAYA_ALLOW_RENDER_LAYER_SWITCHING

Set this environment variable to 1 so that referenced objects that have simple shading overrides (that is, no component shading, no shared shading networks, no referenced render layers) correctly maintain their shading assignments as the current render layer switches when the object is unloaded. (Applies to legacy render layers.)

OCIO

Set this environment variable to the full path and name of an OpenColorIO configuration file to use for color management. This is a shared environment variable that is used by applications that support OpenColorIO.

When OCIO is set, then in your Color Management preferences:
  • Enable Color Management and Use OCIO configuration are enabled at startup, in new scenes, and on scene load.
  • OCIO config path is set to the path defined by the environment variable.
  • The various color space and transform menus are filled with the options defined in the OpenColorIO configuration file. The built-in options are not available.

The OCIO environment variable is overridden if you are using a policy to configure color management, as described in Use color management policies (external preference files).

OCIO_ACTIVE_DISPLAYS

Set this environment variable to a colon-delimited list of displays to override the active_displays setting of an OpenColorIO configuration file. The displays must be defined in the configuration file.

OCIO_ACTIVE_VIEWS

Set this environment variable to a colon-delimited list of displays to override the active_views setting of an OpenColorIO configuration file. The views must be defined in the configuration file.

MAYA_VP2_PAUSE_ON_STARTUP

Set this environment variable to 1 to pause Viewport 2.0 upon startup. The Material Viewer (if set to use the hardware renderer), and other editors such as the UV Editor are also paused as a result. Paused editors appear with a red border and the text Paused to indicate their paused state.

MAYA_BATCH_DISABLE_UNDO_MANAGER_FLUSH_ON_EXIT

Set this environment variable to 1 to improve performance when running mayabatch.exe on scripts that bake animation over a large range of frames. When this environment variable is set, mayabatch skips flushing the undo queue when exiting.

SHADERFX_CUSTOMUSERPATH

By default, ShaderFX saves custom elements (such as group nodes, scenes, and baked preview swatches) to the maya\ShaderFX folder of your $HOME or \MyDocuments directory. To customize the location of your ShaderFX folder, set the system environment variable SHADERFX_CUSTOMUSERPATH to your preferred location.

Render setup environment variables

MAYA_RENDER_SETUP_GLOBAL_TEMPLATE_PATH

Set this environment variable to the network location for your global render setup templates. Saving templates to a globally accessible network location allow them to be shared among users

A template is a .json file that represents your render setup; for example, your entire render setup configuration, or a subset of collections, or a render layer and its collections. You can export a template and import it into another scene so that you don't have to re-create your render setup.

Maya automatically searches for available templates in this directory and displays the applicable options in the right-click menus in the Render Setup editor. See Import and export your render setup.

MAYA_RENDER_SETUP_GLOBAL_PRESETS_PATH

Set this environment variable to the network location for your global Render Settings presets. Saving presets to a globally accessible network location allow them to be shared among users. Presets can be saved in the form of a .json file.

Maya automatically searches for available presets in this directory and displays them in the Presets > Load Preset menu in the Render Settings window and in the menu in the Render Setup editor. See Export and import Render Settings as a preset.

MAYA_RENDER_SETUP_USE_UNTITLED_COLLECTIONS

This environment variable controls whether new objects created while in an active render layer are saved to an untitled collection. Set this environment variable to 0 to disable this behavior, and 1 to enable. This environment variable takes precedence over the Options > Enable untitled collections when new objects are created menu option in the Render Setup editor. When set, the menu option is greyed out and follows the value of the environment variable. See Untitled collection created automatically by Maya.

MAYA_RENDER_SETUP_INCLUDE_ALL_LIGHTS

This environment variable controls whether lights are automatically included in all render layers by default. Set this environment variable to 0 to disable this behavior, and 1 to enable. This environment variable takes precedence over the Options > Include all lights in each render layer by default menu option in the Render Setup editor. When set, the menu option is greyed out and follows the value of the environment variable. See Avoid adding lights to layer by default.

MAYA_RENDER_SETUP_DISPLAY_RS_NODES

This environment variable controls whether Render Setup nodes such as renderSetup, renderSetupLayer1, collection1, and so forth are hidden in editors such as the Outliner. Set this environment variable to 0 to disable this behavior, and 1 to enable. This environment variable takes precedence over the Options > Display Render Setup nodes in editors menu option in the Render Setup editor. When set, the menu option is greyed out and follows the value of the environment variable. See Display Render Setup nodes in the Outliner and other editors.

MAYA_RENDER_SETUP_DISABLE_RENDER_SETTINGS_AOVS_EXPORT

This environment variable controls whether the scene Render Settings and AOVs are exported along with the Render Setup nodes when you select File > Export All from the Render Setup editor. Set this environment variable to 1 to disable this behavior, and 0 to enable. This feature is most useful if you want to export a template to use its render setup layers, collections, and overrides, but without modifying the Render Settings or AOVs in the scene that you are importing to.

You can also set this behavior locally by enabling or disabling the Export Render Settings and AOVs option in the Export all render setup window. This behavior is enabled by default when the environment variable is not set.

The environment variable setting takes precedence over the UI setting unless explicitly overridden. For example, if you set this environment variable to 1, then select File > Export All and enable the Export Render Settings and AOVs option before exporting, the scene Render Settings and AOVs will be included in the exported .json file. However, this option will be disabled again the next time you select File > Export All.

See Export your complete render setup.

MAYA_RENDER_SETUP_ENABLE_WARNING_ICONS

This environment variable controls whether icons appear in the Render Setup editor when there are missing collection members. Set this environment variable to 1 for icons to be shown and 0 for them to be hidden. This environment variable takes precedence over the Options > Show Render Setup warning icons menu option in the Render Setup editor. When set, the menu option is greyed out and follows the value of the environment variable. See Identify missing members in a collection.