Square Enix © Goodbye Kansas

Table of Contents

This page covers the various environment variables for use in V-Ray for Maya.


Overview


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). 

When installing V-Ray from a .zip file, please refer to Environment setup for the appropriate environment variables.

Starting 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.


Licensing


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.


Textures and Render Assets


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 macOS, paths are separated by either a colon (:) or semicolon (;).

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 macOS, 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. This variable has a similar function to the Tiled texture cache size System parameter and is only applied if it has a higher value than it.

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 – Specifies additional locations for shader description files, using the V-Ray for Maya SDK to extend V-Ray for Maya with custom shaders. This allows V-Ray to create custom Maya shading nodes for a V-Ray Standalone plugin and to specify how the shading node is translated to the V-Ray standalone plugin.

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_PATH_REMAP_FILEPATH (standalone) – Specifies a path to an XML file with path remapping data. This environment variable is an alternative to the -remapPathFile flag. Example file:

<RemapPaths>
    <RemapItem>
        <From>Z:/export</From>
        <To>/mnt/export</To>
    </RemapItem>
</RemapPaths>

Asset Caching


Asset caching can be used for copying network assets locally on render node machines. Additionally, the same setup can be used together with Distributed Rendering to specify how and where transferred assets are cached.

VRAY_ASSETS_CACHE_PATH – When set on a machine that is used as a render server during distributed rendering, this variable specifies the path where V-Ray will store the transferred assets.

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.

When local caching fails, the asset will still be loaded from its original network path.


Distributed Rendering


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 servers 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_ASSETS_VERIFICATION_METHOD – When set on a machine that is used as a render server 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 server 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.


V-Ray GPU


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_GPU_PLATFORMS=gpu // only GPU devices will be used
VRAY_GPU_PLATFORMS=titan;// Titan GPUs will be used
VRAY_GPU_PLATFORMS=intel cpu;gtx 980 // Intel CPU devices and GTX 980 devices will be used
VRAY_GPU_PLATFORMS=titan index0;titan index2 // the first and third GTX Titan graphics card installed on the machine will be used

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_OPTIX_DENOISER_PLATFORMS – Specifies the GPU devices used for denoising with the NVIDIA AI denoiser. This variable works similar to the VRAY_GPU_PLATFORMS one. From all devices that match the query, only the device with the highest compute capability is used for denoising. This variable is available with V-Ray Next, Update 2.1 (version 4.30.01) and later).

VRAY_GPU_NVLINK_DISABLE – If set to 1, NVLink manager is disabled and it doesn't share VRAM between GPUs. This variable is available with V-Ray Next, Update 2.1 (version 4.30.01 and later).

VFB Control


VRAY_VFB_SRGB (standalone) – When set to 1, indicates that the sRGB button of the V-Ray VFB is switched on by default. When set to 2, the sRGB button of the V-Ray VFB should be switched off by default.

OCIO - Specifies the default OCIO color configuration if OCIO display color correction is enabled.

VRAY_VFB_OCIO – When set to 1, the OCIO button of the V-Ray VFB is switched on by default. When set to 2, the OCIO button of the V-Ray VFB is switched off by default.

VRAY_VFB_OCIO_INPUT_COLORSPACE - Specifies default overriding input OCIO color space. A default OCIO configuration can be specified by the OCIO environment variable.

VRAY_VFB_OCIO_VIEW_TRANSFORM - Specifies default overriding OCIO view transform. A default OCIO configuration can be specified by the OCIO environment variable.

VRAY_VFB_PIXEL_ASPECT (standalone) – When set to 1, indicates that the VFB should have the pixel aspect correction enabled by default.

VRAY_WRITE_COLOR_CORRECTIONS – When present and set to 0, specifies that by default any color corrections to the final images written to the disk should be disabled.

VRAY_VFB_ICC - Enable (1) or Disable (2) the ICC correction in VFB by default.

VRAY_VFB_ALWAYS_ON_TOP - Specify an ALWAYS ON TOP behavior:

0 - disabled
1 - force enable always on top
- force disable always on top

Log File


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).


Command Line


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.


Miscellaneous


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.

VRAY_NO_BUMP_ATTENUATION - When set to 1, it disables the bump attenuation that was added in V-Ray 5 for all materials and produces results like V-Ray Next. Not supported when rendering with V-Ray GPU.

VRAY_DISABLE_DRAG_DROP_FILEEXT – Disables drag and drop import for file formats supported in V-Ray for Maya. Such as ies; vrmesh, abc; aur; vdb; f3d; vrscene; vrlmap files. To enter file format to be excluded, enter them in a list, separated with semicolons like so:
VRAY_DISABLE_DRAG_DROP_FILEEXT=abc;vrmesh;vrscene