This page covers the various environment variables for use in V-Ray for Maya.
There are some environment variables that affect the operation of V-Ray. Some of these variables are in effect in both V-Ray Standalone and V-Ray for Maya, while some of them are pertinent to V-Ray Standalone only. The variables that are valid for V-Ray Standalone only are marked with (standalone).
With V-Ray Next, the _x64 suffix for environment variables is no longer used. However, using the _x64 suffix will still work as a fall-back, but it will print a warning.
VRAY_AUTH_CLIENT_FILE_PATH – Points to the folder containing the vrlclient.xml file that contains the V-Ray license server settings (IP address and port number).
VRAY_CONNECT_TIMEOUT – The timeout (in milliseconds) when connecting to the license server.
VRAY_CMD_PREFIX (standalone) – Specifies command-line options for V-Ray Standalone which are prepended to the actual command line.
VRAY_CMD_SUFFIX (standalone) – Specifies command line options that are appended to the actual command line.
VRAY_ASSETS_PATH – Specifies a list of paths where V-Ray will look for textures, GI cache files etc. Initially, V-Ray will attempt to look for an asset in the path specified in the scene. If this fails, V-Ray will go through the paths in the VRAY_ASSETS_PATH variable and try to find a file with the same name. On Windows, paths are separated with a semicolon (;). On Linux and Mac OS X, paths are separated by either a colon (:) or semicolon (;).
VRAY_LOCAL_CACHE_LIMIT_TYPE - Specifies a local cache for rendering assets. The assets are copied locally for use by V-Ray, so that the original assets can remain unlocked for editing in other applications. This variable specifies the limit type of the cache, while VRAY_LOCAL_CACHE_LIMIT_VALUE specifies the limit size of the cache. The limit is not applied during rendering, files are cleaned up after the render finishes. By default, the local cache is written to a vray_assets_cache folder placed (and automatically created) in the user's temp directory. The VRAY_ASSETS_CACHE_PATH variable can be used to specify a different location for the local cache.
-1 - disabled (default)
0 - no limit
1 - limit by age in hours. Files older than N hours are deleted.
2 - limit by maximum size in gigabytes.
VRAY_LOCAL_CACHE_LIMIT_VALUE - A limit to the local asset cache. The meaning of the value depends on VRAY_LOCAL_CACHE_LIMIT_TYPE. Setting VRAY_LOCAL_CACHE_LIMIT_VALUE to 0 will effectively delete all cached files after every render.
VRAY_TEXTURES_LOAD_16BIT_AS_8BIT – When set to 1, V-Ray will load 16-bit PNG and TIFF texture files as 8-bit in memory.
VRAY_TEXTURES_USE_SYNCOLOR – When set to 0, V-Ray will ignore the SynColor color space of the textures and work only with the standard V-Ray gamma attributes.
VRAY_PLUGINS (standalone) – Specifies a list of paths for additional V-Ray plugins. On Windows, paths are separated with a semicolon (;). On Linux and Mac OS X, paths are separated by either a colon (:) or semicolon (;).
VRAY_TEXTURE_CACHE – Specifies the size, in megabytes (MB), of a separate texture cache to be used for tiled OpenEXR files. If this is not present, or the value is 0, the same cache is shared between dynamic geometry and tiled textures. One of the advantages of a separate texture cache is that it is persistent across the frames when rendering an animation.
VRAY_TERMINATE_ON_FRAME_END – Causes V-Ray to directly exit after a frame is complete in order to avoid slowdowns when freeing memory.
VRAY_TERMINATE_ON_SEQUENCE_END – Causes V-Ray to directly exit after the sequence is complete in order to avoid slowdowns when freeing memory.
Use the VRAY_TERMINATE_ON_FRAME_END and VRAY_TERMINATE_ON_SEQUENCE_END environment variables only on render servers where each frame/sequence is rendered by a separate process (either Maya or V-Ray Standalone). Do not use this in interactive Maya sessions as it will cause Maya to exit immediately after a render (even a swatch render).
VRAY_MAYA_KEEP_BITMAPS – Enables the bitmaps caching between renders (same as the Cache bitmaps between renders option in the Rendering Overrides rollout of the Render Settings dialog).
VRAY_FOR_MAYA_SHADERS – A list of paths that will be used to read additional V-Ray shaders export files (in addition to the vray/shaders path).
VRAY_MAX_OPEN_FILES – Sets a limit on the number of files that can be opened simultaneously. This allows users to set a limit that is lower than their OS default. V-Ray creates a pool of file handles using this specified value, and when the limit is reached, the remaining files are added to a queue. When a loaded file is no longer used, it is freed from memory and a queued file is loaded in its place.
VRAY_VFB_SRGB (standalone) – When set to 1, the sRGB button of the V-Ray VFB is automatically switched on. When set to 2, the sRGB button of the V-Ray VFB is switched off.
VRAY_VFB_LUT (standalone) – When set to 1, the LUT color correction is enabled by default. The LUT file is specified with the VRAY_VFB_LUT_FILE environment variable.
VRAY_VFB_LUT_FILE – Specifies the path and name of the LUT file.
VRAY_VFB_OCIO – When set to 1, the OCIO button of the V-Ray VFB is automatically switched on. When set to 2, the OCIO button of the V-Ray VFB is switched off.
VRAY_VFB_PIXEL_ASPECT (standalone) – When set to 1, the pixel aspect correction for the VFB is automatically enabled.
VRAY_WRITE_COLOR_CORRECTIONS – When present and set to 0, disables any color corrections to the final images written to the disk.
VRAY_VFB_COLOR_CORRECT_ALL – When set to 1, applies color corrections to all present render elements in the VFB. Default value is set to 0, meaning some channels (such as extraTex, Multimatte, etc) are excluded from the color correction.
VRAY_FOR_MAYA_LOG_FILE_NAME – Specifies the name of the log file (vray4maya_log.txt is used if not set).
VRAY_FOR_MAYA_LOG_FILE_PATH – Specifies the path to the log file (the temp folder is used if not set).
VRAYSL_LOG_FILE_NAME (standalone) – Specifies the name of the log file for DR rendering (vraysl_log.txt is used if not set).
VRAYSL_LOG_FILE_PATH (standalone) – Specifies the path to the log file for DR rendering (the temp folder is used if not set).
VRAY_DR_BROADCASTPORT – Specifies the port number used for broadcasting messages for joining a rendering. If not specified, port 20203 is used. Make sure this port is opened so render slaves can join the rendering.
VRAY_DR_SUBNET – Specifies the subnet mask for broadcast messages. This is currently used only when a render server is started so that it can join a DR render.
VRAY_FOR_MAYA_DRPORT – Sets the default port to use when adding new distributed rendering servers in the Maya UI (from the DR Settings window). If you don't explicitly specify a port, the value set here will be used. If not set here, the default of 20207 will be used.
VRAY_FOR_MAYA_xxxx_DRPORT – Specifies the default port number used for IPR rendering in Maya when used out-of-process. The xxxx must be replaced with the Maya version, e.g. 2014.
VRAY_ASSETS_CACHE_PATH – When set on a machine that is used as a render slave during distributed rendering, this variable specifies the path where V-Ray will store the transferred assets.
VRAY_ASSETS_VERIFICATION_METHOD – When set on a machine that is used as a render slave during distributed rendering, this variable specifies the asset verification method:
0 - by modification date (default)
1 - by size
2 - by MD5 checksum
VRAY_NUM_THREADS – Manually sets the number of computation threads. By default (when "Max Render Threads" is 0) V-Ray creates one computational thread per CPU core.
VRAY_KEEP_TEMP_VRSCENE – When set to a value of 1 the .vrscene files from DR or local machines will not be deleted after rendering.
VRAY_VRSCENE_LOCATION – When set on a machine that is used as a render slave during distributed rendering, this variable specifies the path to store the temporary .vrscene file. When this variable is not set, the default user temp directory is used.
VRAY_FOR_MAYA_DRLISTS_PATH – Specifies the path to an alternate DR XML configuration file. For more information, see the Distributed Rendering Settings page.
VRAY_USE_NORMAL_DIFFERENTIALS – When set to 1, V-Ray will use the surface curvature when calculating ray differentials for secondary rays for reflection, refraction, and GI. This is typically helpful with tiled OpenEXR and TIFF textures, as it will produce a more accurate estimate for the required mip-map level (which otherwise might be overestimated resulting in a more detailed level being loaded than is really necessary).
VRAY_GPU_PLATFORMS – Specifies the CUDA devices to be used for V-Ray GPU rendering. This variable is automatically set when a device is selected using the V-Ray Render Settings (or the equivalent external tool provided with the V-Ray installation vray_gpu_device_select.exe ). If the variable is not set, all available devices will be used. The syntax allows a case insensitive pattern matching of any value to a device name, vendor, type and its index. More than one values can be specified by separating them with a semicolon.
VRAY_MAC_GPU – Though GPU rendering with CUDA on MacOS devices is no longer supported, the advanced users can bring back the old behavior by using this environment variable. Enabling this environment variable is at your own risk!
VRAY_FOR_MAYA_VP2_GAMMA – Prior to Maya 2013.5, all textures shown with VRay materials in Viewport 2.0 are linear. You must enable the viewport gamma to see the proper color correction. This is similar to how VRay (and most other software works). However, Maya itself does not convert the texture to linear space. In 2013.5 and next, VRay tries to mimic that behavior. If you like to revert to linear workflow, set this variable to 1.
VRAY_FOR_MAYA_VP2_BAKE_RESOLUTION – Because of limitations in Maya itself, V-Ray can't support textures in their native resolution like the standard Viewport 2.0 does. V-Ray must always bake the textures, and it's using the Bake Resolution for Unsupported Texture Types option in the Hardware Renderer 2.0 Settings dialog. The default resolution there is very low (64) by default. V-Ray ignores values below 256. However, even this resolution is not very suitable, and forcing high resolution for all unsupported textures may be undesirable. In such case, this environment variable can be used, ignoring the Viewport 2.0 setting.
MAYA_ENABLE_PRE_RENDER – A small number of features in V-Ray require reading specific attributes for the whole animation range before the actual rendering can start. Prior to V-Ray 3.0, this required a pre-render run along the whole animation range. V-Ray 3.0 avoids this extra cost which can be significant with dynamics on the scene. If due to bugs in Maya or V-Ray this method fails, this will be reported and it's still possible to use the slow (but proven) method.
VRAY_IGNORE_FIX_DARK_EDGES – Due to a bug in V-Ray 2.0, the Fix dark edges option of the VRayMtl didn't work. This environment variable can be used to keep compatibility with old scenes which rendered wrong.