© Square Enix © Goodbye Kansas


Table of Contents

This page provides information on the Override Material node.


Overview


The V-Ray MtlOverride is a utility material provided with the V-Ray renderer. It allows a surface to look different depending on whether it is seen through reflections, refractions, or GI.

With this material you can get a fine control over the color bleeding, reflections, refractions, and shadows of the objects.

This group of attributes allows the material to be changed depending on the type of ray. For example, an object can be rendered with one material when looked directly from the camera, and with another material, when looked in reflections.



Node


The MtlOverride node provides inputs for controlling various material properties. Some correspond to parameters in the section below.

base_mtl – Specifies the material V-Ray uses while rendering the object.

gi_mtl – Specifies the material V-Ray uses while calculating the GI solution.

reflect_mtl – The material V-Ray uses to render the object with, when the object is seen in reflections. For more information, see Using the Reflect material example below.

refract_mtl – The material V-Ray uses to render the object with, when the object is seen in refractions. For more information, see Using the Refract material example below.

shadow_mtl – The material that is used to render shadows cast from the object.



Parameters


Enable GI Material – Enables the rendering of the material connected to the gi_mtl input of the node. See the Using the GI material example.

Enable Reflection Material – Enables the rendering of the material connected to the reflect_mtl input of the node. See the Using the Reflection material example.

Enable Refraction Material – Enables the rendering of the material connected to the refract_mtl input of the node. See the Using the Refraction material example.

Enable Shadow Material – Enables the rendering of the material connected to the shadow_mtl input of the node.

Use Environment Override Texture – Enables the environment override.

Environment – Specifies the environment override texture.

Environment Priority – Specifies the priority of this environment override when several materials override it along a ray path.






Example: Using the GI material


This example shows how the use of a GI material affects the rendering.



without GI
with GI



This simple interior scene represents a room lit by two rectangle V-Ray Lights - one hidden top light and another back fill light - as well as by three disc V-Ray Lights for the pendant lamps above the sinks.

A wooden V-Ray Material from the Chaos Cosmos library is applied on the floor, and a default V-Ray Material with Diffuse Color (128, 128, 128) is applied on the rest of the scene objects, except for the glass objects (mirror and pendant lamp plafonds).

In the first image, it is visible that all walls, objects, and the ceiling are rendered in some light brown color, despite having a light-gray material assigned to them. This is due to the color bleeding, generated by the GI calculations.

In the second image, the scene is rendered with a V-Ray Override GI material assigned to the floor. The V-Ray Override contains in itself the initial two V-Ray materials: the wooden V-Ray Material as base and the default V-Ray Material as GI material. The rest of the scene objects keep the default gray V-Ray Material. So now V-Ray knows that while calculating the GI it has to use the GI material (in this case: V-Ray Material with Diffuse Color (128, 128, 128) and during rendering it uses the Base material (in this case: the wooden V-Ray Material). The result of that is quite different from the previous render as the Color Bleeding is gone. Of course this depends entirely on your choice for the GI material. For instance, if you had chosen a bluish colored material, the final result would also be tinted slightly to blue, like in the first render with the pale brown colors.

In this simple scene, the result of the second render can be produced, with a pre-saved irradiance map, calculated with just the walls' material assigned to all the geometry.

For a much more complex scene, with lots of different geometry, shaders, textures, etc., using the V-Ray Override material can be very helpful.






Example: Using the Reflection material


The following example uses a very simple scene. It contains five chairs and a light source in a studio type environment. Each chair has a V-Ray Override material assigned, but only the Base Material is active. The rendered chairs are the same in their diffuse colors and reflections.






Now each of the chairs has a different material assigned in their Override Reflection Material. The first one has a green diffuse color, the second one has black, the third one has blue, the fourth - purple, and the fifth has a red diffuse color. V-Ray uses those materials when the objects are seen in reflections. In our project, the environment is actually a reflective surface, so the chairs are being reflected. On the other hand, you can also notice that the base material of the chairs is also reflective (Fresnel type), and the fourth chair is seen with its Override Reflection material in the middle chair.








Example: Using the Refraction material


The next render is even more complex as the chairs' Override Refraction Material is activated as well. From left to right follow: a blue and a red diffuse color. Those materials are set so that when seen through refraction, V-Ray considers and renders the objects with them. As you can see the Reflection materials are still affecting the render image. If you take a closer look at the glass chairs' edges you will notice the green reflection, which is actually the reflection material of the right chair. While V-Ray had been tracing the rays on the chairs' surfaces, those polygons on the edges had first captured a reflection, so that's why there are green traces.