This page provides information on environment variables that affect V-Ray.
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 3ds Max, 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).
VRAY_AUTH_CLIENT_FILE_PATH – The path to the vrlclient.xml file containing information about the license (e.g. license server IP address and port).
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 pre-pended 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 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.
VRAY30_RT_FOR_3DSMAXnnnn_PLUGINS_x64 (standalone) – Specifies a list of paths for additional V-Ray plugins. Paths are separated with ';' on Windows and ';' or ':' on Linux/Mac OS X. nnnn in the name of the variable is the version of 3ds max (for example VRAY30_RT_FOR_3DSMAX2017_PLUGINS_x64).
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.
VRAY_VFB_SRGB (standalone) – If set to 1, the sRGB button of the V-Ray VFB is automatically switched on. If set to 2, the sRGB button of the V-Ray VFB is switched off.
VRAY_VFB_LUT (standalone) – If 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 – 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_PIXEL_ASPECT (standalone) – If set to 1, the pixel aspect correction for the VFB is automatically enabled.
VRAY_WRITE_COLOR_CORRECTIONS – If present and set to 0, disables any color corrections to the final images written to the disk.
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).
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 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_ASSETS_CACHE_PATH – When set on a machine that is used as a render slave during distributed rendering, this variable specifies a 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 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 slave 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.
VRAY_USE_NORMAL_DIFFERENTIALS – If 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_OPENCL_PLATFORMS_x64 – Specifies the CUDA or OpenCL devices to be used for V-Ray RT GPU rendering. This variable is automatically set when a device is selected using the V-Ray RT GPU settings in 3ds Max (or the equivalent 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_IGNORE_FIX_DARK_EDGES – Due to a bug in V-Ray 2.0, the "Fixed dark edges" of the VRayMtl didn't work. This environment variable can be used to keep compatibility with old scenes which rendered wrong.