# Layered Materials - Opacity Mask

**URL:** <https://forums.unrealengine.com/t/layered-materials-opacity-mask/13350>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [October 16, 2014, 1:25pm UTC](https://forums.unrealengine.com/t/layered-materials-opacity-mask/13350 "2014-10-16T13:25:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fragloser](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fragloser](https://forums.unrealengine.com/u/fragloser)\
**Post date:** [October 16, 2014, 1:25pm UTC](https://forums.unrealengine.com/t/layered-materials-opacity-mask/13350/1 "2014-10-16T13:25:49Z")

</div>

Hi everyone. I’m trying to use a opacity alpha (black and white) plugged into a MatLayerBlend\_OverrideOpacityMask for a layered material. When I use the mask in a standard material, it works; however, it doesn’t seem to work in the layered material. This question has been posted before but it was never resolved.

Also, here are some images that show the two setups (one working, one non-working).

Working (basic): [http://i.imgur.com/SGlnvsu.png](http://i.imgur.com/SGlnvsu.png)

Non-working (layer\_blend): [http://i.imgur.com/Gytq2n3.png](http://i.imgur.com/Gytq2n3.png)

> **[Layered material use opacity?](https://forums.unrealengine.com/questions/52024/layered-material-use-opacity.html)**
>
> I am trying to create a layered material combining several material functions, like described in the tutorials. Now, one of my materials should have parts that you can look through. With normal materials I can use my mask in the opacity mask slot...

---

<div class="post-metadata">

**Author:** ![fragloser](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fragloser](https://forums.unrealengine.com/u/fragloser)\
**Post date:** [October 16, 2014, 2:01pm UTC](https://forums.unrealengine.com/t/layered-materials-opacity-mask/13350/2 "2014-10-16T14:01:13Z")

</div>

Fixed if anyone runs across this thread while having the same problem:

[![](https://i.imgur.com/IDi0qZm.png) ](https://i.imgur.com/IDi0qZm.png)

---

<div class="post-metadata">

**Author:** ![UnrealBucket](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnrealBucket](https://forums.unrealengine.com/u/UnrealBucket)\
**Post date:** [October 16, 2014, 2:22pm UTC](https://forums.unrealengine.com/t/layered-materials-opacity-mask/13350/3 "2014-10-16T14:22:18Z")

</div>

Hello beefaroni. Actually it works. I did a small test now and I must say it’s bit tricky. First of all you need to use a 1.0 constant (or texture with at least one pure white channel) for the Mask input if you want to use another texture entirely. Secondly, and what confused me, you need to import the same opacity texture you use in material function. However there is a bug and preview doesn’t work in Material function.

Here are some screenshots:  
Material Function: [http://imgur.com/KtmaAzX](http://imgur.com/KtmaAzX) - no opacity preview  
Material: [http://imgur.com/ai1MgAm,YardKoQ#0](http://imgur.com/ai1MgAm,YardKoQ#0) - material using material function WITHOUT Opacity mask override  
Material: [http://imgur.com/ai1MgAm,YardKoQ#1](http://imgur.com/ai1MgAm,YardKoQ#1) - material using material function WITH Opacity mask override  
Material: [http://imgur.com/QwxVNcF](http://imgur.com/QwxVNcF) - opacity mask override not working

As you can see it works only when I have “checker” texture inside material.

Hope it helps.

---

<div class="post-metadata">

**Author:** ![UnrealBucket](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnrealBucket](https://forums.unrealengine.com/u/UnrealBucket)\
**Post date:** [October 16, 2014, 2:24pm UTC](https://forums.unrealengine.com/t/layered-materials-opacity-mask/13350/4 "2014-10-16T14:24:03Z")

</div>

> [@beefaroni;164628](#):
>
> Fixed if anyone runs across this thread while having the same problem:
> 
> [http://i.imgur.com/IDi0qZm.png](http://i.imgur.com/IDi0qZm.png)

Yeah that’s the workaround I also tested. Anyway it’s confusing.
