---
title: "Environment Variables"
canonical: "https://documentation.chaos.com/space/VMAX/113586786/Environment%20Variables"
format: markdown
---
This page provides information on environment variables that affect V-Ray.


## **Overview**

---

<span style="color: #333333">There are some</span> [environment variables](https://docs-chaos.atlassian.net/wiki/spaces/VNS/pages/115605616) <span style="color: #333333">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).</span>


## **Licensing**

---

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


## **Command Line**

---

<span style="color: #333333">**VRAY_CMD_PREFIX**</span><span style="color: #333333"> </span><span style="color: #333333">**(standalone)**</span><span style="color: #333333"> – Specifies command-line options for V-Ray Standalone, which are pre-pended to the actual command line.</span>

<span style="color: #333333">**VRAY_CMD_SUFFIX**</span><span style="color: #333333"> </span><span style="color: #333333">**(standalone)**</span><span style="color: #333333"> – Specifies command line options that are appended to the actual command line.</span>


## **Processes**

---

<span style="color: #333333">**VRAY_PROCESS_MAX_OPEN_FILES**</span><span style="color: #333333"> – Controls the file limit for the whole process. It is helpful for tackling the </span><span style="color: #333333">*Too many open files (24)*</span><span style="color: #333333"> error. This command is available in V-Ray 6 only.</span>


## > Macro (anchor)

 **Textures and Render Assets**

---

<span style="color: #333333">**VRAY_ASSETS_PATH**</span><span style="color: #333333"> – 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 </span><span style="color: #333333">** VRAY_ASSETS_PATH **</span><span style="color: #333333"> 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.</span>

<span style="color: #333333">**VRAY_TEXTURES_LOAD_16BIT_AS_8BIT**</span><span style="color: #333333"> – If set to </span><span style="color: #333333">*1*</span><span style="color: #333333">, V-Ray loads 16-bit PNG and TIFF texture files as 8-bit versions in memory.</span>

<span style="color: #333333">**VRAY5_FOR_3DSMAXnnnn_PLUGINS (standalone)**</span><span style="color: #333333"> – 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).</span>

<span style="color: #333333">**VRAY_TEXTURE_CACHE**</span><span style="color: #333333"> – 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</span><span style="color: #333333">* 0*</span><span style="color: #333333">, 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.</span>

<span style="color: #333333">**VRAY_TERMINATE_ON_FRAME_END **</span><span style="color: #333333">– Causes V-Ray to directly exit after a frame is completed in order to avoid slowdowns when freeing memory.</span>

<span style="color: #333333">**VRAY_TERMINATE_ON_SEQUENCE_END**</span><span style="color: #333333"> – Causes V-Ray to directly exit after the sequence is completed in order to avoid slowdowns when freeing memory.</span>

> ℹ️ 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.

<span style="color: #333333">**VRAY_GPU_SL_SHADERS_LIMIT**</span><span style="color: #333333"> – Controls the number of OSL cache to be deleted during animation. The default value is </span><span style="color: #333333">*64*</span><span style="color: #333333">. If set to </span><span style="color: #333333">*1,*</span><span style="color: #333333"> 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.</span>

<span style="color: #000000">**VRAY_PATH_REMAP_FILEPATH**</span><span style="color: #000000"> (standalone) – Specifies a path to an XML file with path remapping data. This environment variable is an alternative to the </span><span style="color: #000000">**-remapPathFile **</span><span style="color: #000000">flag. Example file:</span>

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



## **AI Functionality**

---

> ℹ️ Chaos AI tools source data responsibly and encourage human authorship.* See our **[Responsible AI](https://www.chaos.com/responsible-ai?srsltid=AfmBOopl3h57iDHmrA5zpdiN6zWnSWWuArFxv7kNeDUB8LlXj-mq5B7r)** page for more information*.

<span style="color: #292a2e">**CHAOS_DISABLE_GEN_AI**</span><span style="color: #292a2e"> – </span>Specifies whether the in-app AI functionalities are disabled in V-Ray: <span style="color: #292a2e"> </span>

<span style="color: #292a2e">**0**</span><span style="color: #292a2e"> - </span>AI features are enabled.  
<span style="color: #292a2e">**1**</span><span style="color: #292a2e"> - </span>AI features are disabled.



## **VFB Control**

---

<span style="color: #333333">**VRAY_VFB_SRGB**</span><span style="color: #333333"> </span><span style="color: #333333">**(standalone)**</span><span style="color: #333333"> – If set to</span><span style="color: #333333">* 1*</span><span style="color: #333333">, the sRGB button of the V-Ray VFB is automatically switched on. If set to </span><span style="color: #333333">*2*</span><span style="color: #333333">, the sRGB button of the V-Ray VFB is switched off.</span>

<span style="color: #333333">**VRAY_VFB_PIXEL_ASPECT**</span><span style="color: #333333"> </span><span style="color: #333333">** (standalone)**</span><span style="color: #333333"> – If set to</span><span style="color: #333333">* 1*</span><span style="color: #333333">, the pixel aspect correction for the VFB is automatically enabled.</span>

<span style="color: #333333">**VRAY_WRITE_COLOR_CORRECTIONS **</span><span style="color: #333333"> – If present and set to </span><span style="color: #333333">*0*</span><span style="color: #333333">, disables any color corrections to the final images written to the disk.</span>

<span style="color: #333333">**VRAY_VFB_GLOBAL_PRESET_FILE_USE **</span><span style="color: #333333">- Enable (1) or Disable (0) automatic loading of a global </span><span style="color: #333333">*.vccglb*</span><span style="color: #333333"> preset for the VFB.</span>

<span style="color: #333333">**VRAY_VFB_GLOBAL_PRESET_FILE **</span><span style="color: #333333">- Specify default </span><span style="color: #333333">*.vccglb*</span><span style="color: #333333"> filename (string) to be used when loading automatic global preset.</span>

<span style="color: #333333">**VRAY_VFB_ICC **</span><span style="color: #333333">- Enable (1) or Disable (2) the ICC correction in VFB by default.</span>

<span style="color: #333333">**VRAY_VFB_ICC_FILE **</span><span style="color: #333333">- Specify default ICC correction file for New VFB. It will be automatically loaded when ICC is enabled.</span>

<span style="color: #333333">**VRAY_VFB_OCIO**</span><span style="color: #333333"> – If set to 1, the OCIO button of the V-Ray VFB is automatically switched on. If set to </span><span style="color: #333333">*2*</span><span style="color: #333333">, the OCIO button of the V-Ray VFB is switched off.</span>

<span style="color: #333333">**VRAY_VFB_OCIO_INPUT_COLORSPACE **</span><span style="color: #333333">- Specify default overriding input OCIO color space. A default OCIO configuration can be specified by the OCIO environment variable.</span>

<span style="color: #333333">**VRAY_VFB_OCIO_DISPLAY_DEVICE **</span><span style="color: #333333">- Specify default overriding OCIO display device. A default OCIO configuration can be specified by the OCIO environment variable.</span>

<span style="color: #333333">**VRAY_VFB_OCIO_VIEW_TRANSFORM**</span><span style="color: #333333"> - Specify default overriding OCIO view transform. A default OCIO configuration can be specified by the OCIO environment variable.</span>

<span style="color: #333333">**VRAY_VFB_LUT (standalone)**</span><span style="color: #333333"> – If set to</span><span style="color: #333333">* 1*</span><span style="color: #333333">, the LUT color correction is enabled by default. The LUT file is specified with the VRAY_VFB_LUT_FILE environment variable.</span>

<span style="color: #333333">**VRAY_VFB_LUT_FILE**</span><span style="color: #333333"> – Specifies the path and name of the LUT file.</span>

<span style="color: #333333">**VRAY_VFB_AFFECT_SWATCHES**</span><span style="color: #333333"> - Apply VFB corrections to swatches in the Material Editor:</span>

<span style="color: #343a41">**0**</span><span style="color: #333333"> - none</span>  
<span style="color: #343a41">**1**</span><span style="color: #333333"> - OCIO only</span>  
<span style="color: #343a41">**2**</span><span style="color: #333333"> - all corrections except sRGB</span>  
<span style="color: #343a41">**3**</span><span style="color: #333333"> - all corrections including sRGB</span>

<span style="color: #333333">**VRAY_VFB_ALWAYS_ON_TOP **</span><span style="color: #333333">- Specify an ALWAYS ON TOP behavior:</span>

<span style="color: #333333">**0**</span><span style="color: #333333"> - disabled</span>  
<span style="color: #333333">**1**</span><span style="color: #333333"> - force enable always on top</span>  
<span style="color: #333333">**2**</span><span style="color: #333333"> - force disable always on top</span>



## **Log File**

---

<span style="color: #333333">**VRAY_SYSTEM_LOG_FILE **</span><span style="color: #333333"> – Sets the location of the V-Ray log file. This overrides the </span><span style="color: #333333">**system_vrayLog_file**</span><span style="color: #333333"> vrender parameter.</span>

<span style="color: #333333">**VRAY_LOG_CC_TO_DEBUGGER**</span><span style="color: #333333"> – Writes a copy of the V-Ray log to the 3ds Max debug log output. The default value of </span><span style="color: #333333">*-1*</span><span style="color: #333333"> uses the setting from the </span><span style="color: #333333">**system_vrayLog_ccToDebugger**</span><span style="color: #333333"> vrender parameter. If set to </span><span style="color: #333333">*1*</span><span style="color: #333333">, the variable is enabled and when set to </span><span style="color: #333333">*0,*</span><span style="color: #333333"> it is disabled. Also writes progress with increment steps of 10%.</span>

<span style="color: #333333">**VRAYSL_LOG_FILE_NAME (standalone)**</span><span style="color: #333333"> – Specifies the name of the log file for DR rendering (vraysl_log.txt is used if not set).</span>

<span style="color: #333333">**VRAYSL_LOG_FILE_PATH (standalone)**</span><span style="color: #333333"> – Specifies the path to the log file for DR rendering (the temp folder is used if not set).</span>


## **Distributed Rendering**

---

<span style="color: #333333">**VRAY_DR_BROADCASTPORT**</span><span style="color: #333333"> – Specifies the port number used for broadcasting messages for joining a rendering. If not specified, port </span><span style="color: #333333">**20203**</span><span style="color: #333333"> is used. Make sure this port is opened so that render servers can join the rendering.</span>

<span style="color: #333333">**VRAY_DR_SUBNET**</span><span style="color: #333333"> – 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.</span>

<span style="color: #333333">**VRAY_ASSETS_CACHE_PATH**</span><span style="color: #333333"> – 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.</span>

<span style="color: #333333">**VRAY_ASSETS_VERIFICATION_METHOD**</span><span style="color: #333333"> – When set on a machine that is used as a render server during distributed rendering, this variable specifies the asset verification method: </span><span style="color: #333333">*0*</span><span style="color: #333333"> - by modification date (default), </span><span style="color: #333333">*1*</span><span style="color: #333333"> - by size,</span><span style="color: #333333">* 2*</span><span style="color: #333333"> - by MD5 checksum.</span>

<span style="color: #333333">**VRAY_NUM_THREADS**</span><span style="color: #333333"> – Manually set the number of computation threads. By default (when "Max Render Threads" is </span><span style="color: #333333">*0*</span><span style="color: #333333">) V-Ray creates one computational thread per CPU core.</span>

<span style="color: #333333">**VRAY_KEEP_TEMP_VRSCENE**</span><span style="color: #333333"> – When set to a value of </span><span style="color: #333333">*1*</span><span style="color: #333333"> the </span><span style="color: #333333">*vrscene*</span><span style="color: #333333"> files from DR or local machines are not deleted after rendering.</span>

<span style="color: #333333">**VRAY_VRSCENE_LOCATION**</span><span style="color: #333333"> – When set on a machine that is used as a render server during distributed rendering, this variable specifies the path to store the temporary </span><span style="color: #333333">*.vrscene*</span><span style="color: #333333"> file. The default user temp directory is used when this variable is not set.</span>


## **V-Ray GPU**

---

<span style="color: #333333">**VRAY_GPU_PLATFORMS**</span><span style="color: #333333"> – Specifies the CUDA devices to be used for V-Ray GPU rendering. This variable is automatically set when a device is selected using the</span> [V-Ray GPU settings](https://docs-chaos.atlassian.net/wiki/spaces/VMAX/pages/113587142)<span style="color: #333333"> in 3ds Max (or the equivalent external tool provided with the V-Ray installation </span><span style="color: #333333">*vray_gpu_device_select.exe*</span><span style="color: #333333">). 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.</span>

<details>
<summary>VRAY_GPU_PLATFORMS Examples...</summary>

```csharp
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
```
</details>

<span style="color: #333333">**VRAY_GPU_NVLINK_DISABLE**</span><span style="color: #333333"> – If set to 1, NVLink manager is disabled and doesn't share VRAM between GPUs.</span>

<span style="color: #333333">**VRAY_OPTIX_DENOISER_PLATFORMS**</span><span style="color: #333333"> – Specifies the GPU devices used for denoising with the NVIDIA AI denoiser. This variable works similarly to the</span><span style="color: #333333">** VRAY_GPU_PLATFORMS**</span><span style="color: #333333"> one. From all devices that match the query, only the device with the highest compute capability is used for denoising. </span>

> ℹ️ 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.


## **Viewport**

---

<span style="color: #292a2e">**VRAY_MESHPROXY_VIEWPORT_NORMALS_SIMPLE_SMOOTH**</span>

<span style="color: #292a2e">0 – Default value.</span>  
<span style="color: #292a2e">1 – Provides better viewport experience/responsiveness in case of animated proxies with heavy geometry. </span>

> ℹ️ It forces simplified normals computation when Compute normals is checked.  
> ℹ️ In this case, the viewport smoothing appearance does not change on smooth angle modification and differs from the render appearance.