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_PROCESS_MAX_OPEN_FILES – Controls the file limit for the whole process. It is helpful for tackling the Too many open files (24) error. This command is available in V-Ray 6 only.
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 goes through the paths in the VRAY_ASSETS_PATH variable and tries to find a file with the same name. On Windows, paths are separated with a semicolon ';' while on Linux and macOS - either a colon ':' or semicolon ';' can be used to separate paths.
VRAY_TEXTURES_LOAD_16BIT_AS_8BIT – If set to 1, V-Ray loads 16-bit PNG and TIFF texture files as 8-bit versions in memory.
VRAY5_FOR_3DSMAXnnnn_PLUGINS (standalone) – Specifies a list of paths for additional V-Ray plugins. Paths are separated with ';' on Windows and ';' or ':' on Linux/macOS. nnnn in the name of the variable is the version of 3ds Max (for example VRAY5_FOR_3DSMAX2021_PLUGINS).
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_GPU_SL_SHADERS_LIMIT – Controls the number of OSL cache to be deleted during animation. The default value is 64. If set to 1, the cache is deleted for every frame. For more complicated scenes, or when using an interactive render a higher value works better. This variable is useful for animations with 3ds max OSLs as these shaders can cause a progressive slowdown in animation.
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_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_VFB_GLOBAL_PRESET_FILE_USE - Enable (1) or Disable (0) automatic loading of a global .vccglb preset for the VFB.
VRAY_VFB_GLOBAL_PRESET_FILE - Specify default .vccglb filename (string) to be used when loading automatic global preset.
VRAY_VFB_ICC - Enable (1) or Disable (2) the ICC correction in VFB by default.
VRAY_VFB_ICC_FILE - Specify default ICC correction file for New VFB. It will be automatically loaded when ICC is enabled.
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 - Specify default overriding input OCIO color space. A default OCIO configuration can be specified by the OCIO environment variable.
VRAY_VFB_OCIO_DISPLAY_DEVICE - Specify default overriding OCIO display device. A default OCIO configuration can be specified by the OCIO environment variable.
VRAY_VFB_OCIO_VIEW_TRANSFORM - Specify default overriding OCIO view transform. A default OCIO configuration can be specified by the OCIO environment variable.
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_AFFECT_SWATCHES - Apply VFB corrections to swatches in the Material Editor:
0 - none
1 - OCIO only
2 - all corrections except sRGB
3 - all corrections including sRGB
VRAY_VFB_ALWAYS_ON_TOP - Specify an ALWAYS ON TOP behavior:
0 - disabled
1 - force enable always on top
2 - force disable always on top
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. Also writes progress with increment steps of 10%.
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 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_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 stores the transferred assets.
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 are not 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.
VRAY_USE_NORMAL_DIFFERENTIALS – If set to 1, V-Ray uses 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 produces 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 GPU settings in 3ds Max (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 are 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 are used VRAY_GPU_PLATFORMS=titan;amd // Titan GPUs and AMD GPUs are used VRAY_GPU_PLATFORMS=intel cpu;gtx 980 // Intel CPU devices and GTX 980 devices are used VRAY_GPU_PLATFORMS=titan index0;titan index2 // the first and third GTX Titan graphics card installed on the machine will be used
VRAY_GPU_NVLINK_DISABLE – If set to 1, NVLink manager is disabled and doesn't share VRAM between GPUs.
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 3 (version 4.30.01) and later.
In V-Ray 6 for 3ds Max, the environment variable VRAY_OPTIX_DENOISER_PLATFORMS is deprecated. Instead, use the redesigned Select rendering devices for V-Ray GPU for 3ds Max #### to set GPU devices for denoising.