---
title: "V-Ray Material"
canonical: "https://documentation.chaos.com/space/APPSDK/132811653/V-Ray%20Material"
format: markdown
---
This page describes the V-Ray Material and its properties in V-Ray APP SDK.


## **Overview**

---

### **Opacity**

- **opacity_source** – Choose between grayscale (0) or colored (1) opacity.
- **opacity **– The opacity of the material.
- **opacity_color **– The color opacity map of the material.
- **opacity_mode **– The opacity mode:  
**Normal (0)** – (Legacy) The opacity map is evaluated as normal: the surface lighting is computed and the ray is continued for the transparent effect. The opacity texture is filtered as normal.   
**Clip (1)** – (Very fast) The opacity texture is not filtered and it is clipped to either fully opaque or fully transparent based on the mid-point value. Useful when there are many transparent surfaces one behind the other like leaves.  
**Stochastic(2)** – (Optimal) The opacity texture is filtered and the surface is randomly shaded as either fully opaque or fully transparent for a correct average appearance.

### **Diffuse**

- **diffuse** – this is the diffuse color of the material. Note the actual diffuse color of the surface also depends on the reflection and refraction colors. See the Energy preservation parameter below.
- **roughness** – this parameter can be used to simulate rough surfaces or surfaces covered with dust (for example, skin, or the surface of the moon). For more information, see The Roughness Parameter example below.
- **roughness_model** – The roughness model:  
**Gamma-based(0)** – The roughness model used in older versions of V-Ray. This is not the recommended option.  
**Oren-Nayar (1)** – A reflectivity model for diffuse reflection from rough surfaces that has been shown to accurately predict the appearance of a wide range of natural surfaces. We recommend using this roughness model.

###   
**Reflection**

- **reflect** – reflection color. Note that the reflection color dims the diffuse surface color based on the Energy preservation option. For more information, see The Reflection Color Parameter example below.
- **fresnel** – checking this option makes the reflection strength dependent on the viewing angle of the surface. Some materials in nature (glass, etc.) reflect light in this manner. Note that the Fresnel effect depends on the index of refraction as well.
- **fresnel_ior** – the IOR to use when calculating Fresnel reflections. Normally this is locked to the Refraction IOR parameter, but you can unlock it for finer control. For more information, see The Fresnel Option example below.
- **fresnel_ior_lock **– True to use the refraction ior also for the Fresnel term (fresnel_ior is ignored).
- **hilight_glossiness** – this determines the shape of the highlight on the material. Normally this parameter is locked to the Reflection glossiness value in order to produce physically accurate results.
- **hilight_glossiness_lock** – True to use the reflection glossiness also for hilights (hilight_glossiness is ignored).
- **reflect_glossiness** – controls the sharpness of reflections. A value of 1.0 means perfect mirror-like reflection; lower values produce blurry or glossy reflections. Use the *Subdivs* parameter below to control the quality of glossy reflections. For more information, see The Reflection Glossiness Parameter example below.
- **reflect_subdivs** – controls the quality of glossy reflections. Lower values will render faster, but the result will be more noisy. Higher values take longer, but produce smoother results.
- **reflect_dim_distance** – specifies a distance after which the reflection rays will not be traced.
- **reflect_dim_distance_falloff** – a fall off radius for the dim distance.
- **reflect_affect_alpha** – Allows you to specify which channels are going to be affected by the reflection of the material
  - **Color Only (0)** – the reflection will affect only the RGB channel of the final render
  - **Color+alpha (1)** – this will cause the material to transmit the alpha of the reflected objects, instead of displaying an opaque alpha.
  - **All channels (2)** – all channels and render elements will be affected by the reflections of the material.
- **reflect_depth** – the number of times a ray can be reflected. Scenes with lots of reflective and refractive surfaces may require higher values to look right.
- **reflect_exit_color** – if a ray has reached its maximum reflection depth, this color will be returned without tracing the ray further.
- **gtr_gamma** – How much to increase/decrease the tail of the glossy highlight when using GGX reflection model.
- **metalness **– When this is 0.0, the material uses dielectric reflections, and when it is 1.0, metallic reflections are used.
- **gtr_energy_compensation**
  - (0) – No GTR energy compensation;
  - (1) – GTR energy compensation with color sharpening;
  - (2) – GTR energy compensation without color sharpening.
- **reflect_trace** – if this is off, reflections will not be traced, even if the reflection color is greater than black. You can turn this off to produce only highlights. Note that when this is off, the diffuse color will not be dimmed by the reflection color, as would happen normally.
- **hilight_soften** – How much to soften hilights and reflections at grazing light angles

### **Anisotropy**

- **anisotropy **– The anisotropy for glossy reflections, from -1 to 1 (0.0 is isotropic reflections).
- **anisotropy_rotation** – The rotation of the anisotropy axes, from 0.0 to 1.0.
- **anisotropy_derivation** – What method to use for deriving anisotropy axes (0 - local object axis; 1 - a specified uvw generator).
- **anisotropy_axis** – Which local object axis to use when anisotropy_derivation is 0. (0 - X; 1 - Y; 2 - Z)
- **anisotropy_uvwgen** – The uvw generator to use for anisotropy when anisotropy_derivation is 1.
- **new_gtr_anisotropy** – If true, the new phisically correct GTR anisotropy is used. Otherwise, the old anisotropy that applies to all brdf types is used.

### Thin Film

- **thin_film_on** – Enables the Thin Film effect. Thin Film recreates the effect of thin film interference on a surface making the material iridescent. Some common uses are soap bubbles and reflective car paint layering.
- **thin_film_thickness_min** – Determines the minimum thickness of the thin film. If no Thickness Blend is applied, only this value is used for the thickness of the thin film.
- **thin_film_thickness_max** – <span style="color: #272727">Determines the maximum thickness of the thin film, when </span>**Thickness **<span style="color: #272727">is applied.</span>
- <span style="color: #272727">**thin_film_thickness **</span><span style="color: #272727">– Allows a map to be attached that blends the thickness values. If no map is applied, only the </span><span style="color: #272727">**Min Thickness**</span><span style="color: #272727"> value is used to determine thickness.</span>
- <span style="color: #272727">**thin_film_ior**</span><span style="color: #272727"> – Specifies the reflective index of the thin film. A map can be attached to this slot.</span>

### **Refraction**

- <span style="color: #202124">**refract**</span><span style="color: #202124"> – refraction color. Note that the actual refraction color depends on the reflection color as well. For more information, see The Refraction Color Parameter example below.</span>
- <span style="color: #202124">**refract_ior**</span><span style="color: #202124"> – index of refraction for the material, which describes the way light bends when crossing the material surface. A value of 1.0 means the light will not change direction. </span>
- <span style="color: #202124">**refract_glossiness**</span><span style="color: #202124"> – controls the sharpness of refractions. A value of 1.0 means perfect glass-like refraction; lower values produce blurry or glossy refractions. Use the Subdivs parameter below to control the quality of glossy refractions.</span>
- <span style="color: #202124">**refract_subdivs**</span><span style="color: #202124"> – controls the quality of glossy refractions. Lower values will render faster, but the result will be more noisy. Higher values take longer, but produce smoother results. This parameter also controls the quality of the translucent effect, if on (see below).</span>
- <span style="color: #202124">**refract_thin_walled**</span><span style="color: #202124"> – True to enable thin-walled refraction.</span>
- <span style="color: #202124">**refract_trace**</span><span style="color: #202124"> – if this is off, refractions will not traced, even if the refraction color is greater than black.</span>
- <span style="color: #202124">**refr_interpolation_on**</span><span style="color: #202124"> – V-Ray can use a caching scheme similar to the irradiance map to speed up rendering of glossy refractions and translucency. Check this option to turn caching on. </span>
- <span style="color: #202124">**refract_depth**</span><span style="color: #202124"> – the number of times a ray can be refracted. Scenes with lots of refractive and reflective surfaces may require higher values to look right.</span>
- <span style="color: #202124">**refract_exit_color_on**</span><span style="color: #202124"> – If false, when the maximum refraction depth is reached, the material is assumed transparent, instead of terminating the ray.</span>
- <span style="color: #202124">**refract_exit_color**</span><span style="color: #202124"> – if this is on, and a ray has reached the maximum refraction depth, the ray will be terminated and the exit color returned. When this is off, the ray will not be refracted, but will be continued without changes. </span>
- <span style="color: #202124">**fog_color **</span><span style="color: #202124">– the attenuation of light as it passes through the material. This option allows the user to simulate the fact that thick objects look less transparent than thin objects. Note that the effect of the fog color depends on the absolute size of the objects and is therefore scene-dependent unless the Fog system units scaling is enabled. The fog color also determines the look of the object when using translucency. </span>
- <span style="color: #202124">**fog_color_tex**</span><span style="color: #202124"> – The absorption (fog) color texture.</span>
- <span style="color: #202124">**fog_mult**</span><span style="color: #202124"> – the strength of the fog effect. Smaller values reduce the effect of the fog, making the material more transparent. Larger values increase the fog effect, making the material more opaque. In more precise terms, this is the inverse of the distance at which a ray inside the object is attenuated with am amount equal to the Fog color. </span>
- <span style="color: #202124">**fog_depth**</span><span style="color: #202124"> – Controls the strength of the fog effect. Higher values reduce the effect of the fog, making the material more transparent. Smaller values increase the fog effect, making the material more opaque. The Depth parameter replaces the previous Fog multiplier with an easier to control value in centimeters.</span>
- <span style="color: #202124">**fog_bias**</span><span style="color: #202124"> – this parameter allows the user to change the way the fog color is applied; by adjusting this parameter, you can make thin parts of the object to appear more transparent or less transparent than normal.</span>
- <span style="color: #202124">**fog_unit_scale_on**</span><span style="color: #202124"> – Enable unit scale multiplication, when calculating absorption. When this is enabled, the fog multiplier is in cm^-1. When this is disabled, the fog multiplier is in scene_units^-1.</span>  
<span style="color: #202124">**refract_affect_shadows**</span><span style="color: #202124"> – this will cause the material to cast transparent shadows, depending on the refraction color and the fog color. This only works with V-Ray shadows and lights.</span>
- <span style="color: #202124">**refract_affect_alpha**</span><span style="color: #202124"> – Allows you to specify which channels are going to be affected by the transparency of the material.</span>

<span style="color: #202124">**Color Only (0)**</span><span style="color: #202124"> – the transparency will affect only the RGB channel of the final render</span>  
<span style="color: #202124">**Color+alpha (1)**</span><span style="color: #202124"> – this will cause the material to transmit the alpha of the refracted objects, instead of displaying an opaque alpha. Note that currently this works only with clear (non-glossy) refractions.</span>  
<span style="color: #202124">**All channels (2)**</span><span style="color: #202124"> – all channels and render elements will be affected by the transparency of the material.</span>

- <span style="color: #202124">**dispersion_on**</span><span style="color: #202124"> – this option enables the calculation of true light wavelength dispersion. </span>
- <span style="color: #202124">**dispersion**</span><span style="color: #202124"> - (a.k.a. abbe) this option allows you to increase or decrease the dispersion effect. Lowering it widens the dispersion and vice versa.</span>

### Translucency

- **translucency** – selects the algorithm for calculating translucency (also called sub-surface scattering). Note that refraction must be enabled for this effect to be visible. The possible values are:
  - **None (0)** – no translucency is calculated for the material;
  - **Hard (wax) model (1)** – this model is specifically suited for hard materials like marble;
  - **Soft (water) model (2)** – this model is mostly for compatibility with older V-Ray versions (1.09.x);
  - **Hybrid model (3)** – this is the most realistic sss model and is suitable for simulating skin, milk, fruit juice and other translucent materials.
  - **Volumetric translucency (4)** –
  - **Volumetric (water) model (5)** – Works together with the Refraction color of the material to scatter light inside the object. It is useful for liquids and other highly transparent materials. The Refraction color and Refraction glossiness determine respectively how much of the interior of the object is visible and how rays interact with the object’s surface.
  - **SSS (wax) model (6)** – Can work with Refraction color/Glossiness and is useful for skin, wax, marble and other relatively opaque materials.

> ⚠️ The new translucency modes require GI with minimum 16 bounces (brute force or light cache). They also require the Affect shadows option of the material to be enabled. The old modes (**Hard (wax) model, Soft (water) model, Hybrid model**) support only single-bounce scattering.
> ⚠️ 
> ⚠️ As the new translucency modes perform multibounce volumetric light scattering, they require closed objects.


---

### Effect of the number of GI bounces

- **translucency_color** – normally the color of the sub-surface scattering effect depends on the Fog color; this parameter allows you to additionally tint the SSS effect.
- **translucency_thickness** – this limits the rays that will be traced below the surface. This is useful if you do not want or do not need to trace the whole sub-surface volume.
- **translucency_light_mult** – a multiplier for the translucent effect.
- **translucency_scatter_coeff** – the amount of scattering inside the object. 0.0 means rays will be scattered in all directions; 1.0 means a ray cannot change its direction inside the sub-surface volume.
- **translucency_scatter_dir** - controls the direction of scattering for a ray. 0.0 means a ray can only go forward (away from the surface, inside the object); 0.5 means that a ray has an equal chance of going forward or backward; 1.0 means a ray will be scattered backward (towards the surface, to the outside of the object).
- **translucency_amount** – Translucency amount for volumetric or SSS translucency.
- **translucency_surfaceLighting** – Determines how direct illumination is computed for sub-surface scattering. The uniform method spreads light more uniformly inside the material and is faster for skin etc. The directional method tends to propagate more light in the direction from which it illuminates the surface. The directional method requires the 'affect shadows' option to be enabled so that shadows extend below the surface; this method may also produce a faceted look on low-poly objects.

### Self-Illumination

- **self_illumination** – controls the emission of the surface.
- **self_illumination_gi** – when enabled, the self-illumination affects global illumination rays and allows the surface to cast light on nearby objects. Note however, that it may be more efficient to use area lights or BRDFLight material for this effect.
- **compensate_camera_exposure** – True, if the camera exposure should be compensated for self-illumination.

### BRDF

**brdf_type** – this determines the type of BRDF (the shape of the highlight):

- **Phong (0)** – Phong highlight/reflections
- **Blinn (1)** – Blinn highlight/reflections
- **Ward (2)** – Ward highlight/reflections
- **Microfacet GTR (GGX) (3)** – GGX highlight/reflections

###   
Options

- <span style="color: #000000">**option_cutoff**</span><span style="color: #000000"> – this is a threshold below which reflections/refractions will not be traced. V-Ray tries to estimate the contribution of reflections/refractions to the image, and if it is below this threshold, these effects are not computed. Do not set this to 0.0 as it may cause excessively long render times in some cases.</span>
- <span style="color: #000000">**environment_priority**</span><span style="color: #000000"> – this specifies how to determine the environment to use if a reflected or refracted ray goes through several materials each of which has an environment override.</span>
- <span style="color: #000000">**option_double_sided**</span><span style="color: #000000"> – if this is checked, V-Ray will flip the normal for back-facing surfaces with this material. Otherwise, the lighting on the "outer" side of the material will be computed always. You can use this to achieve a fake translucent effect for thin objects like paper.</span>
- <span style="color: #000000">**option_reflect_on_back**</span><span style="color: #000000"> – if this is checked, reflections will be computed for back-facing surfaces too. Note that this affects total internal reflections too (when refractions are computed).</span>
- <span style="color: #000000">**option_use_irradiance_map**</span><span style="color: #000000"> – if this is checked, the irradiance map will be used to approximate diffuse indirect illumination for the material. If this is off, brute force GI will be used in which case the quality of the brute force GI is determined by the Subdivs parameter of the Irradiance Map. You can use this for objects in the scene which have small details and are not approximated very well by the irradiance map.</span>
- <span style="color: #000000">**fog_unit_scale_on**</span><span style="color: #000000"> – when enabled, the fog color attenuation becomes dependent on the current system units. For more information, see Fog System Units Scaling example below.</span>
- <span style="color: #000000">**use_environment_override**</span><span style="color: #000000"> – if this is checked, Effect ID can be used to input values for Material ID.</span>
- <span style="color: #000000">**option_glossy_rays_as_gi**</span><span style="color: #000000"> – this specifies on what occasions glossy rays will be treated as GI rays:</span>
  - <span style="color: #000000">**Never (0)**</span><span style="color: #000000"> – glossy rays are never treated as GI rays.</span>
  - <span style="color: #000000">**Only for GI rays (1)**</span><span style="color: #000000"> – glossy rays will be treated as GI rays only when GI is being evaluated. This can speed up rendering of scenes with glossy reflections and is the default.</span>
  - <span style="color: #000000">**Always (2)**</span><span style="color: #000000"> – glossy rays are always treated as GI rays. A side effect is that the Secondary GI engine will be used for glossy rays. For example, if the primary engine is irradiance map, and the secondary is light cache, the glossy rays will use the light cache (which is a lot faster).</span>
- <span style="color: #000000">**option_energy_mode**</span><span style="color: #000000"> – determines how the diffuse, reflection, and refraction color affect each other. V-Ray tries to keep the total amount of light reflected off a surface to be less than or equal to the light falling on the surface (as this happens in the real life). For this purpose, the following rule is applied: the reflection level dims the diffuse and refraction levels (a pure white reflection will remove any diffuse and refraction effects), and the refraction level dims the diffuse level (a pure white refraction color will remove any diffuse effects). This parameter determines whether the dimming happens separately for the RGB components or is based on the intensity:</span>
  - <span style="color: #000000">**RGB (0)**</span><span style="color: #000000"> – this mode causes dimming to be performed separately on the RGB components. For example, a pure white diffuse color and pure red reflection color will give a surface with cyan diffuse color (because the red component is already taken by the reflection).</span>
  - <span style="color: #000000">**Monochrome (1)**</span><span style="color: #000000"> – this mode causes dimming to be performed based on the intensity of the diffuse/reflection/refraction levels. For more information, see The Energy Preservation Mode Parameter example below.</span>
- <span style="color: #000000">**option_fix_dark_edges**</span><span style="color: #000000"> – True to fix dark edges for glossy reflections with low samples; only set this to false for compatibility with older versions.</span>
- <span style="color: #000000">**option_glossy_fresnel **</span><span style="color: #000000">– True to enable glossy Fresnel. </span>
- <span style="color: #000000">**option_use_roughness**</span><span style="color: #000000"> – True to invert all glossiness values and use roughness instead.</span>
- <span style="color: #000000">**environment_override**</span><span style="color: #000000"> – Environment override texture.</span>
- <span style="color: #000000">**(deprecated) refl_interpolation_on **</span><span style="color: #000000">– This is deprecated and will be removed. This has no effect.</span>
- <span style="color: #000000">refl_imap_min_rate </span>
- <span style="color: #000000">refl_imap_max_rate</span>
- <span style="color: #000000">refl_imap_color_thresh</span>
- <span style="color: #000000">refl_imap_norm_thresh</span>
- <span style="color: #000000">refl_imap_samples</span>
- <span style="color: #000000">**channels **</span><span style="color: #000000">– Render channels in which the result of this material will be written to.</span>
- <span style="color: #000000">**volume **</span><span style="color: #000000">– Volume to use for this material. This parameter will make the material ignore the fog and translucency parameters.</span>

### Sheen and Coat

- **sheen_color** – The sheen color of the material.
- **sheen_glossiness** – <span style="color: #272727"> Controls the sharpness of reflections. A value of 1.0 means all of the light reaches the diffuse color, and when the value is smaller, the cloth material looks glossier.</span>
- **coat_color** – Determines the coat layer's color. The Coat Color tints all layers - reflection, sheen, diffuse and refraction. Note that the coat specular highlights are not affected and are always white.
- **coat_amount** – <span style="color: #272727">Specifies the </span><span style="color: #202124">blending weight </span><span style="color: #272727">of the coat layer. A value of 0 does not add a coat layer, while higher values blend the coat gradually.</span>
- **coat_glossiness** – Controls the sharpness of reflection. A value of 1.0 means perfect glass-like reflection; lower values produce blurry or glossy reflections.
- **coat_ior** – The index of refraction of the coat layer of the material.
- **coat_bump_lock** – Locks the coat bump map to the base bump map.
- **bump_map** – Specifies the base bump map.
- **bump_amount **– Determines the bump amount.
- **bump_type** – The type of the map (0 - from regular texture output, 1 - normal map in tangent space, 2 - normal map in object space, 3 - normal map in camera space, 4 - normal map in world space, 5 - from texture bump output, 6 - explicit normal)
- **coat_bump_map** – Specifies the coat bump map.
- **coat_bump_amount **– Determines the coat bump amount.
- **coat_bump_type** – The type of the map (0 - from regular texture output, 1 - normal map in tangent space, 2 - normal map in object space, 3 - normal map in camera space, 4 - normal map in world space, 5 - from texture bump output, 6 - explicit normal).
- **lpe_label **– Light path expressions material label which can be used to identify the material.

---

### **Example: Roughness**

---

---

---

---

---

---

### **Example: Dispersion Abbe**


---

### BRDFVRayMtl presets


## **Code example**

---

<details>
<summary>Python</summary>

```python
# Load scene from a file.
renderer.load(os.path.join(SCENE_PATH, 'material.vrscene'))

# Create a new BRDFVRayMtl
newBRDF = renderer.classes.BRDFVRayMtl()
# We specify solid red color
newBRDF.diffuse = vray.AColor(1.0, 0.0, 0.0)
# We also make the material reflective with red color
newBRDF.reflect = vray.AColor(1.0, 0.0, 0.0)

newMaterial = renderer.classes.MtlSingleBRDF()
newMaterial.brdf = newBRDF

newNode = renderer.classes.Node()
newNode.material = newMaterial
newNode.geometry = renderer.plugins['CubeShape@mesh2']
newNode.transform = vray.Transform(vray.Matrix(1), vray.Vector(-15, 0, 0))
```
</details>

<details>
<summary>C++</summary>

```c++
// Load scene from a file.
renderer.load("material.vrscene");

// Create a new BRDFVRayMtl
BRDFVRayMtl newBRDF = renderer.newPlugin<BRDFVRayMtl>();
// We specify solid red color
newBRDF.set_diffuse(AColor(1.0f, 0.0f, 0.0f));
// We also make the material reflective with red color 
newBRDF.set_reflect(AColor(1.0f, 0.0f, 0.0f));

MtlSingleBRDF newMaterial = renderer.newPlugin<MtlSingleBRDF>();
newMaterial.set_brdf(newBRDF);

Node newNode = renderer.newPlugin<Node>();
newNode.set_material(newMaterial);
newNode.set_geometry(renderer.getPlugin("CubeShape@mesh2"));
newNode.set_transform(Transform(Matrix(1), Vector(-15, 0, 0)));
```
</details>

<details>
<summary>C#.NET</summary>

```csharp
// Load scene from a file.
renderer.Load("material.vrscene");

// Create a new BRDFVRayMtl
BRDFVRayMtl newBRDF = renderer.NewPlugin<BRDFVRayMtl>();
// We specify solid red color
newBRDF.Diffuse = new Color(1.0f, 0.0f, 0.0f);
// We also make the material reflective with red color 
newBRDF.Reflect = new Color(1.0f, 0.0f, 0.0f);

MtlSingleBRDF newMaterial = renderer.NewPlugin<MtlSingleBRDF>();
newMaterial.Brdf = newBRDF;

Node newNode = renderer.NewPlugin<Node>();
newNode.Material = newMaterial;
newNode.Geometry = renderer.GetPlugin("CubeShape@mesh2");
newNode.Transform = new Transform(new Matrix(1), new Vector(-15, 0, 0));
```
</details>

<details>
<summary>Node.js</summary>

```javascript
// Load scene from a file synchronously.
renderer.loadSync("material.vrscene");

// Create a new BRDFVRayMtl
var newBRDF = new renderer.classes.BRDFVRayMtl();
// We specify diffuse red color
newBRDF.diffuse = new vray.Color(1.0, 0.0, 0.0);
// We also make the material reflective with red color 
newBRDF.reflect = new vray.Color(1.0, 0.0, 0.0);

var newMaterial = new renderer.classes.MtlSingleBRDF();
newMaterial.brdf = newBRDF;

var newNode = renderer.classes.Node();
newNode.material = newMaterial;
newNode.geometry = renderer.plugins["CubeShape@mesh2"];
newNode.transform = vray.Transform(vray.Matrix(1), vray.Vector(-15, 0, 0));
```
</details>