# How to make a material mask with gradient borders?

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-material-mask-with-gradient-borders/479063>\
**Category:** Rendering\
**Tags:** border, edge, unreal-engine, mask, question\
**Created:** [February 19, 2021, 6:18pm UTC](https://forums.unrealengine.com/t/how-to-make-a-material-mask-with-gradient-borders/479063 "2021-02-19T18:18:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [February 19, 2021, 6:18pm UTC](https://forums.unrealengine.com/t/how-to-make-a-material-mask-with-gradient-borders/479063/1 "2021-02-19T18:18:54Z")

</div>

Hi, I’m trying to make a simple mask that has gradient transitions near the borders, which I can use it as an opacity map and apply it to a plane object, so it fades out near the edges and blends in with whatever’s behind it, but I’m not so familiar with texture nodes. I made this image on photoshop, but I wanted to recreate this with nodes so it would probably be cheaper, and better quality as I wouldn’t rely on bitmap resolution that would result in pixel bands and artifacts etc, and I’d have more control in real time. How can I make such thing?

 ![330267-image-213786.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/9/c3992567d5c046400f8ebe2d4acb39c0b87424f7.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 22, 2021, 12:39pm UTC](https://forums.unrealengine.com/t/how-to-make-a-material-mask-with-gradient-borders/479063/2 "2021-02-22T12:39:10Z")

</div>

I’d start with that:

 ![330499-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/9/2/19202e872af65f6b39dae726dd0644420a090206.jpeg)

Quite a flexible little thing this is.

---

<div class="post-metadata">

**Author:** ![Kostuk93](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kostuk93](https://forums.unrealengine.com/u/Kostuk93)\
**Post date:** [March 15, 2024, 9:34am UTC](https://forums.unrealengine.com/t/how-to-make-a-material-mask-with-gradient-borders/479063/3 "2024-03-15T09:34:30Z")

</div>

How can I do a custom shape with same effect on edges?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 15, 2024, 9:36am UTC](https://forums.unrealengine.com/t/how-to-make-a-material-mask-with-gradient-borders/479063/4 "2024-03-15T09:36:49Z")

</div>

Start here:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/c/f1c5afdf744e165529b985e3045fedc110e41f81.jpeg "Intuitive Material Building with the UI Material Lab | Inside Unreal") ](https://www.youtube.com/watch?v=WaHlhkmVDoI)

It will lead you to a great collection of samples, examples and methods. It’s one of my fav pieces released recently:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/e/c0ec5487375b751fcd0c65cf5c3c3f656ac5f6ea.jpeg)
