---
title: "How to Apply V-Ray Displacement on V-Ray Decal - Part I"
canonical: "https://documentation.chaos.com/space/VMAX/113578852/How+to+Apply+V-Ray+Displacement+on+V-Ray+Decal+-+Part+I"
format: markdown
---
This page provides general guidelines for using V-Ray Decal with V-Ray Displacement.


## **Overview**

---

With V-Ray Decal you can easily project one material on top of another regardless of the target UV set. The Displacement mapping adds further detail on the V-Ray Decal and its geometry without having to model it first.

This tutorial covers the steps for adding and controlling V-Ray Decal as well as adding V-Ray Displacement on the decal.

The scene used in this tutorial contains a simple room setting and the V-Ray Decal helps to create a procedural wall painting.

> ✅ The scene objects are taken from the extensive Chaos Cosmos 3D library.


<span style="color: #272727">To download scene files: </span>[Download Scene Files](https://drive.google.com/uc?export=download&id=1GR63t72jBiBOhz2C_CyxQaPGti4YqixM)


---


Want to follow along but don’t have a license?: [Download Free Trial](https://www.chaos.com/free-trial?utm_campaign=docs-tutorials&utm_medium=website&utm_source=docs.chaos.com)

![image](media://2a425c60-ffe9-45f3-bb1e-07299028dceb)



## **Preparation**

---

Open the *Interior_Decal_start.max* scene and render the *Camera_01* to get a scene overview.

Note that there are some pre-applied materials in the scene: the wall geometry has a *Stucco-01* material with a map linked to the **Displace** slot and set to 6 to give the wall some fine details.

Keep in mind that for a high precision displacement, you have to use 16-bit or 32-bit maps, especially for closeup renders. However, in this particular case an 8-bit map works just fine.

Also to avoid artifacts, you have to subdivide the underlying geometry.

You can find an* Interior_Decal.vfbl* file, prepared for this particular scene, in the archive. You can apply the .vfbl file through the **Load layer tree preset** button in the VFB or you can make your own color adjustments.

![image](media://65bd1418-13fe-482c-b71d-b39bac172c3a)



## **Create VRayDecal**

---

Let’s build a painting on the wall behind the scene objects.


- Go to the V-Ray menu > Create > Geometry and select **V-Ray Decal**.

*Alternatively, you can use the V-Ray Decal icon from the V-Ray Toolbar, the Create menu option, or the VRayDecal button from the Command panel.*

- Enable the **AutoGrid **option from Command panel > Create tab, and then draw the V-Ray Decal gizmo on the wall.
- In the Modify tab of the Command panel, set the decal’s **Width **and **Length **parameters to 120 each to give the painting dimensions, and position the gizmo in the middle of the wall just above the chair seat.
- Make sure the **Projection depth** is large enough to give the V-Ray Decal an intersection with the wall geometry. Otherwise, it won’t project itself. In this particular case, let’s set it to 75 and move the V-Ray Decal by the** X axis** in front of all objects while it intersects the wall a bit.

![image](media://70cb7c91-9fb5-44fc-9a38-239502a9a7d6)


---


Let’s render two example images for comparison - one with intersection and one without intersection.

Note that the V-Ray Decal projection uses the underlying wall displacement.

As the V-Ray Decal has no material assigned yet, it renders with a default material whose Diffuse color is set by the V-Ray Decal <span style="color: #202124">wireframe color</span>.


![image](media://29d4b76b-03af-40a1-83d0-57ca9ff47712)


![image](media://a0e4a9d8-b068-422c-8c19-0d943dd83b8d)




## **Exclude Objects from VRayDecal**

---

Move the V-Ray Decal projection again so that it intersects the wall.

Now let’s see how to exclude the objects in front of the wall from the decal’s projection.

There are two approaches: either by moving the decal behind the objects (between them and the wall), or by using the Exclude option in the V-Ray Decal parameters.

Let’s try the second approach.


- Open the Exclude/Include dialog from the **Exclude **button, and select all the objects in the scene that you don’t want to be affected by the decal, i.e. the *Chair*, the *Candle_Holders*, and the *Cattails*.

![image](media://b795a673-ada3-4d91-bd09-0aba2aba97d8)


---


Let’s render to see the result.

![image](media://370b87b9-52b7-46ff-9b7a-ce143cfde778)



## **Add Materials to VRayDecal**

---

The base for the painting is ready, so let’s proceed with the creation of the painting material.

- Create a new VRayMtl and name it *Painting_Mtl*.
- Set the **Reflection color** to HSV (0, 0, 200).
- Set the **Reflection Glossiness** to 0.65 to simulate a soft sheen interior paint.
- Leave the **Diffuse color** as it is, you’ll tweak it later.
- Select the V-Ray Decal gizmo in the viewport and assign the Painting material to it.

The V-Ray Decal in the viewport now displays the assigned material and it is no more transparent. You can hide the applied material by disabling the **Preview** checkbox in the V-Ray Decal parameters.

![image](media://14ae6f42-55ff-412e-b5d9-c5ab2576e9dd)


---


Now, let’s create the painting frame.

- Create a general Gradient Ramp map and name it *Painting_Displacement*.
- Set the **Gradient Ramp** type to **Box **and change the **Interpolation **to **Solid**.
- Create new **Flags **by clicking on the Ramp color diagram, position them, and then change their colors as shown in the image.
- Set the **Blur **value to 3 to make the frame profile sloping a bit and to soften the corners.

![image](media://d4de3272-6a23-4242-a0df-20dafc6a521a)



## **Add Displacement to VRayDecal**

---

Plug the Painting_Displacement map in the **Displace** slot of the Painting_Mtl.

In the Maps rollout, set the **Displace amount** to 8.

Keep in mind that when using a Displace on a low-poly geometry, artifacts often appear in the displaced geometry, especially if the camera is close to the object.

![image](media://14894ffe-578c-4370-8055-049880a822d8)


---


Let’s render to see the result.

![image](media://5515c613-c6bd-4070-8ff4-c3ffbb35f44e)


---


Now let's remove the displacement detail from the painting and make it smooth.

- Select the V-Ray Decal in the viewport.
- In the decal’s parameters, enable the **Use only decal displacement** option.

Thus, the V-Ray Decal renders only with the displacement assigned to its material, making the painting surface smooth, while the frame is displaced.

![image](media://3dae9bbe-4de1-4ed7-879f-2cbdb08b704c)


---


Render the scene to see the result.

Notice the thin gap around the painting frame. It's a design decision and it's intentionally produced by the last black strip in the Painting_Frame’s *Gradient Ramp* map.

There is no value for the displacement (since the color is black) which combined with the wall displacement creates this gap detail.

![image](media://c450c668-6f4f-4cd7-8f7c-2dbbf9f6fb5e)



## **VRayDecal Masks**

---

Now, let’s make the painting frame more interesting by adding a real painting image to it.

First, explore the **Mask** option in the V-Ray Decal. It allows for masking the projected material applied to the decal.

Create a general black-white Gradient Ramp map and name it *Painting_Frame_Mask*.

Use a **black** color to cut out the painting as well as to expose the underlying wall material, while the **white** color preserves the V-Ray Decal material on the painting frame.

Set the Gradient Ramp Flags as shown in the image.

Select the V-Ray Decal in the viewport and plug the *Painting_Frame_Mask* map to the **Mask** slot in the decal parameters.

![image](media://98899947-e686-47c6-9148-0459558cb00f)


---


Render.

![image](media://0cdeea1f-7a48-45f5-849b-d85edcdd2e23)


---


The next example shows a more complex masking by using a 3dsMax Composite node. The setup of the Composite is shown in the image and the textures needed can be found in the Assets folder (check the [downloadable scene files](https://docs-chaos.atlassian.net/wiki/spaces/VMAX4EDIT/pages/110946791)).

Plug the Painting_Flowers texture into the Mask slot of the Decal parameters.

![image](media://5139b17d-9792-43c2-9503-7e0c15b6561c)


---


And here is the result.

Let’s render from a different angle, using the Render_Camera_02, to see the side view of the scene.

![image](media://e06aa59c-dd10-45b2-8ac0-5f4124f46f6a)


---


### Final Result



![image](media://2a425c60-ffe9-45f3-bb1e-07299028dceb)






> ℹ️ **Next:**
> ℹ️ 
> ℹ️ [How to Apply Multiple Decals - Part II](https://docs-chaos.atlassian.net/wiki/spaces/VMAX/pages/113588305)