©Marcos Tonda

Table of Contents

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


Overview


There are some environment variables that affect the operation of V-Ray. Some of these variables are universally used by V-Ray Standalone and application specific installations of V-Ray, 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, refer to the Environment setup section for the appropriate environment variables.

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.

See the Getting Started with Environment Variables page for practical examples to get you started.


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 duration (in milliseconds) when connecting to the license server.


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.


Input Files


VRAY_PATH_REMAP_FILEPATH – Specifies a path to an XML file with path remapping data. This environment variable is an alternative to the -remapPathFile flag. See the V-Ray Standalone Command Line Options page for more information. Example file:

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



Asset Caching


Asset caching environment variables can be used for assets transfer when distributed rendering.

VRAY_ASSETS_CACHE_PATH – When set on a machine that is used as a render server during distributed rendering, this variable specifies a 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.


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 attempts 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 ';' while on Linux and Mac OS X - either a colon ':' or semicolon ';' can be used to separate paths.

VRAY_TEXTURES_LOAD_16BIT_AS_8BIT – If set to 1, V-Ray will load 16-bit PNG and TIFF texture files as 8-bit versions in memory.

VRAY_PLUGINS – Specifies a list of paths for additional V-Ray plugins. Paths are separated with ';' on Windows and ';' or ':' on Linux/Mac OS X. 

VRAY_TEXTURE_CACHE  – Specifies the size, in megabytes, 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 frames when rendering an animation.

VRAY_TERMINATE_ON_FRAME_END – Causes V-Ray to directly exit after a frame is completed in order to avoid slowdowns when freeing memory.

VRAY_TERMINATE_ON_SEQUENCE_END – Causes V-Ray to directly exit after the sequence is completed in order to avoid slowdowns when freeing memory.

Use the VRAY_TERMINATE_ON_FRAME_END/VRAY_TERMINATE_ON_SEQUENCE_END environment variables only on render servers where each frame/sequence is rendered by a separate process (either 3ds Max or V-Ray Standalone). Do not use this in interactive 3ds Max sessions as it will cause 3ds Max to exit immediately after a render.


Log File


VRAY_SYSTEM_LOG_FILE – Sets the location of the V-Ray log file.  This overrides the system_vrayLog_file vrender parameter.

VRAY_LOG_CC_TO_DEBUGGER – Writes a copy of the V-Ray log to the 3ds Max debug log output. The default value of -1 uses the setting from the system_vrayLog_ccToDebugger vrender parameter. If set to 1, the variable is enabled and when set to 0, it is disabled.

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


VFB Control


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_PIXEL_ASPECT  (standalone) – When set to  1 , the pixel aspect correction for the VFB is automatically enabled.

VRAY_VFB_GLOBAL_PRESET_FILE  Points to the Globals preset file path.

VRAY_VFB_GLOBAL_PRESET_FILE_USE – When set to 1, the VFB uses the specified Globals preset file.

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

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_DISPLAY_DEVICE – Specifies default overriding OCIO display device. 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_OCIO_INPUT_COLORSPACE = ACES - ACEScg
VRAY_VFB_OCIO_DISPLAY_DEVICE = ACES
VRAY_VFB_OCIO_VIEW_TRANSFORM = sRGB


Distributed Rendering


VRAY_DR_CONTROLPORT (standalone) – Specifies the port number used for distributed rendering. Note that in V-Ray 3.0 this environment variable is used only if you specify 0 for the port number. If this environment variable is also missing, port 20204 is used, as that is the default value set for V-Ray for 3ds Max.

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 that 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_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 set 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. The default user temp directory is used when this variable is not set.


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 external tool provided with the V-Ray installation ocldeviceselect.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 semi-column.

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