# Decal applied to a plane leaks into other surfaces

**URL:** <https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085>\
**Category:** Rendering\
**Tags:** unreal-engine, Decals, Rendering, question\
**Created:** [June 17, 2024, 8:44am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085 "2024-06-17T08:44:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![OscarEsteban3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OscarEsteban3D](https://forums.unrealengine.com/u/OscarEsteban3D)\
**Post date:** [June 17, 2024, 8:44am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/1 "2024-06-17T08:44:56Z")

</div>

Hello everyone, I’ve been trying to implement a system that allows you to change Deferred Decal material attributes per primitive. My initial approach was to change the values by using custom primitive data, but I realised it does not work with the Unreal Decal Actor.

Knowing this, I decided to go with Mesh Decals by using simple planes with the Deferred Decal material applied, and everything worked as expected, except right now Decals leak into other surfaces even if they are placed bellow.

I’d be pretty grateful if you could help me with this or if you faced this situation before.

Thank you!

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c24539625c706a61a75bb767e05e9179d9662.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 17, 2024, 10:04am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/2 "2024-06-17T10:04:59Z")

</div>

It’s not clear what’s happening there 🙂

I assume you either don’t want it on the floor, or the ball?

You can limit the axes used by a decal with this method

> [@How to Reduce Decal Stretching?](https://forums.unrealengine.com/t/how-to-reduce-decal-stretching/1192458):
>
> I’m working on a FPS game where I need to spawn decal on the wall behind an enemy I shot after the bullet went through the enemy, the problem is, when the decal get passed some worldstatic objects, it projects long stretched lines on them along the way it goes. I wonder is there a way to make the decal “wrap” around the world objects, instead of “cutting” through them? and if it’s doable, what should I be looking at? Any hints or tips? Many many thanks!!!

---

<div class="post-metadata">

**Author:** ![OscarEsteban3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OscarEsteban3D](https://forums.unrealengine.com/u/OscarEsteban3D)\
**Post date:** [June 17, 2024, 10:37am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/3 "2024-06-17T10:37:36Z")

</div>

Hi!

What I expected to happen is that the plane that behaves as a Decal does not affect the ball, only the floor. It is weird because the Decal is right below the sphere so it should not be affecting it.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/9/9f909bc7d38f243340b0e4a7af3ecf9eacd8159c.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 17, 2024, 10:43am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/4 "2024-06-17T10:43:32Z")

</div>

If it’s just a mesh, you’re right, it should not affect the ball?.. 🤔

---

<div class="post-metadata">

**Author:** ![OscarEsteban3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OscarEsteban3D](https://forums.unrealengine.com/u/OscarEsteban3D)\
**Post date:** [June 17, 2024, 11:00am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/5 "2024-06-17T11:00:16Z")

</div>

I’ve got more information, if I preview the DBuffer information, the MeshDecal is not taking the sphere into account to be projected while the regular DecalActor is occluded as expected.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/3/ee3ea1e6de58b831dd99bcae5e892c95f5a74468.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/3/8d3f434d70e3570ee30c891c79e28aa877a1eebf.jpeg)

---

<div class="post-metadata">

**Author:** ![OscarEsteban3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OscarEsteban3D](https://forums.unrealengine.com/u/OscarEsteban3D)\
**Post date:** [June 17, 2024, 11:01am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/6 "2024-06-17T11:01:32Z")

</div>

But depending on the angle it does weird things…

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/d/8ad21c23a8a427f5a5aad3950de341d8b1176115.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 17, 2024, 11:01am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/7 "2024-06-17T11:01:35Z")

</div>

Is has to be the material, placing a plane there, wouldn’t have this effect.

---

<div class="post-metadata">

**Author:** ![OscarEsteban3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OscarEsteban3D](https://forums.unrealengine.com/u/OscarEsteban3D)\
**Post date:** [June 17, 2024, 11:17am UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/8 "2024-06-17T11:17:01Z")

</div>

I’ve tried to make the simplest material possible for this situation and it does not change anything. Really really weird to be honest.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/3/633ef0878020431c86089083eaa68e7ced1ef566.jpeg)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/3/9739131597ea11a88b6b09eac78bc0b675442114.png)

---

<div class="post-metadata">

**Author:** ![Solithas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Solithas](https://forums.unrealengine.com/u/Solithas)\
**Post date:** [June 17, 2024, 1:12pm UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/9 "2024-06-17T13:12:26Z")

</div>

Can you not simply untick receive decals on the sphere mesh?

---

<div class="post-metadata">

**Author:** ![OscarEsteban3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OscarEsteban3D](https://forums.unrealengine.com/u/OscarEsteban3D)\
**Post date:** [June 17, 2024, 2:07pm UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/10 "2024-06-17T14:07:40Z")

</div>

I found the solution and it was pretty simple, somehow Near Clip Plane value was changed to 0.01 via DefaultEngine and it was messing up DBuffer behaviour.

Thank you guys for your help with this!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 17, 2024, 2:08pm UTC](https://forums.unrealengine.com/t/decal-applied-to-a-plane-leaks-into-other-surfaces/1906085/11 "2024-07-17T14:08:21Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
