# How to detect transparency or colour on a mask?

**URL:** <https://forums.unrealengine.com/t/how-to-detect-transparency-or-colour-on-a-mask/425393>\
**Category:** Rendering\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [May 18, 2018, 9:38am UTC](https://forums.unrealengine.com/t/how-to-detect-transparency-or-colour-on-a-mask/425393 "2018-05-18T09:38:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kibblesticks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kibblesticks](https://forums.unrealengine.com/u/Kibblesticks)\
**Post date:** [May 18, 2018, 9:38am UTC](https://forums.unrealengine.com/t/how-to-detect-transparency-or-colour-on-a-mask/425393/1 "2018-05-18T09:38:40Z")

</div>

I’m making a top-down 2D map and figured it’d be much faster to paint a collision mask to determine where the player can and can’t go. I could then trace from the cam to the mask to determine whether the area was walk-able or not. However I can’t work out how to find the opaque/transparent parts of a material. I could cut around in a 3D modelling program but that would take much longer and would need to be re-modeled after every change.

If not by alpha, is there a way to get the colour of a material from a location or line trace? Or another solution I haven’t thought of?

---

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [May 18, 2018, 11:50am UTC](https://forums.unrealengine.com/t/how-to-detect-transparency-or-colour-on-a-mask/425393/2 "2018-05-18T11:50:23Z")

</div>

Maybe this will be usefull for you

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![Kibblesticks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kibblesticks](https://forums.unrealengine.com/u/Kibblesticks)\
**Post date:** [May 20, 2018, 3:50pm UTC](https://forums.unrealengine.com/t/how-to-detect-transparency-or-colour-on-a-mask/425393/3 "2018-05-20T15:50:29Z")

</div>

Thanks Redbox, reading the render target definitely seems worth investigating, thanks for sharing!
