# Decal opacity mask not working - why?

**URL:** <https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992>\
**Category:** Rendering\
**Tags:** decal, not-working, opacity, unreal-engine, mask, question\
**Created:** [December 19, 2014, 12:14am UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992 "2014-12-19T00:14:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [December 19, 2014, 12:14am UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/1 "2014-12-19T00:14:39Z")

</div>

![24467-decalopacity.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/5/d558ed6c37704cd679775f3d215d9d26a8562e06.jpeg)

I’ve also tried connecting alpha channel, red channel, etc. + changing opacity mask value, changing sampler type… - still not working. What’s wrong with this material?

**UPDATE:** When spawned in world, opacity mask is working, but not properly - instead of “X” i have two parallel lines… Very similar problem to this: [Decal Become square when spawning - Rendering - Unreal Engine Forums](https://answers.unrealengine.com/questions/66356/decal-become-square-when-spawning.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [December 19, 2014, 6:57pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/2 "2014-12-19T18:57:49Z")

</div>

Hello Slavq,

What you need to do is change your ‘Decal Blend Mode’ to ‘Masked’ instead of ‘Translucent’, and plug your masked texture sample into the ‘Opacity Mask’ pin slot.

Hopefully this resolves your issue, but if you are still not able to get your material to function properly, let me know and we can further investigate.

Thank you,

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [December 19, 2014, 7:07pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/3 "2014-12-19T19:07:34Z")

</div>

I don’t have “Masked” mode there:

![24522-material.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/c/96ca3e2a336924b035aefc556fec06d583698fe2.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [December 19, 2014, 8:13pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/4 "2014-12-19T20:13:15Z")

</div>

No worries that was my mistake. I set up my own decal material using the ‘Emissive’ Decal Blend Mode and was able to get the opacity mask through a Linear Interpolation. Use the images below as a reference on how to set up your own material.

**Material Set Up**

 ![24527-decalemmisivemask.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/9/d697514de979ccae1ae1bd19f2f8fe3c4a69013a.jpeg)

**Material Applied as Deferred Decal**

 ![24528-decalmaterial.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/e/b/feb93642f51ab1d1c77d52b14b7b2f3538412e2d.png)

Hopefully this is the outcome you are looking for, but if you still need some assistance let me know.

Cheers,

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [December 19, 2014, 8:44pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/5 "2014-12-19T20:44:27Z")

</div>

Thanks, but i get weird deformation - instead of “X” i have two parallel lines:

 ![24530-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/b/e3b9b2e6f3ce203f5854fe1f32fb26dad9fe5c1f.png)

Material setup is the same, however, i’ve noticed that my “Opacity Mask Clip Value” is active (not greyed out like in Your screenshot):

 ![24531-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/7/ba7e0e20aa5ec58cd8553edaa358e390e8fc28a5.png)

I’ve tried putting other textures to be sure that’s not a problem with this particular “X” texture.

EDIT: I’ve changed back to Surface, then changed Blend Mode from Masked to Opaque. Then changed back to Deferred Decal - now it’s exacly the same as in your screenshot, but it’s still deformed.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [December 22, 2014, 3:20pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/6 "2014-12-22T15:20:56Z")

</div>

Hey again Slavq,

The next thing I suggest is sending me the texture sample, “X”, you are having trouble with and letting me test it on my end as well.

When sending a file, you need to zip it up into a folder in order for AnswerHub to allow you to attach it here.

Thanks,

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [December 22, 2014, 3:26pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/7 "2014-12-22T15:26:47Z")

</div>

Here it is:  
link text

I’ve also tried with other textures, but maybe i’m saving them in wrong format or something… Thanks

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [December 22, 2014, 4:11pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/8 "2014-12-22T16:11:10Z")

</div>

Hello Slavq,

The problem is with your arrow facing for the decal. The decal is applied to a surface in the direction in which that blue arrow is facing. Here is exactly what I am talking about.

**Properly Applied Decal**

 ![24730-xdecal.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/d/7bd22e341029df5b155175e6ccff9e9c245461a6.png)

**Improper Arrow Direction Decal**

 ![24741-improperdecaldirection.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/e/a3e1b32eff1aeae1ead4b82a8260ffaa5cdd0bda.png)

This should resolve your issue! 🙂

Cheers,

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [December 22, 2014, 4:18pm UTC](https://forums.unrealengine.com/t/decal-opacity-mask-not-working-why/301992/9 "2014-12-22T16:18:07Z")

</div>

Aaah, so that was it… It worked, thanks! 🙂
