# How can I mask textures in a cone?

**URL:** <https://forums.unrealengine.com/t/how-can-i-mask-textures-in-a-cone/433444>\
**Category:** Rendering\
**Tags:** unreal-engine, mask, Rendering, question\
**Created:** [September 8, 2018, 10:48pm UTC](https://forums.unrealengine.com/t/how-can-i-mask-textures-in-a-cone/433444 "2018-09-08T22:48:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0efb4f1d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0efb4f1d](https://forums.unrealengine.com/u/anonymous_user_0efb4f1d)\
**Post date:** [September 8, 2018, 10:48pm UTC](https://forums.unrealengine.com/t/how-can-i-mask-textures-in-a-cone/433444/1 "2018-09-08T22:48:24Z")

</div>

Hello everyone,

Is there any way I can achieve the same effect as in this video, but in a cone shape as opposed to a sphere? I want a flashlight to reveal objects withing its cone for all players to see.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/3/e33f343fb6ff2f91439555427db0038a8f78229a.jpeg "Depth & Location Based Effects | Live Training | Unreal Engine") ](https://www.youtube.com/watch?v=GXbE0IqbA7w)

Any advice would be appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![cridia](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cridia/32/772487_2.png) [@cridia](https://forums.unrealengine.com/u/cridia)\
**Post date:** [September 9, 2018, 11:06am UTC](https://forums.unrealengine.com/t/how-can-i-mask-textures-in-a-cone/433444/2 "2018-09-09T11:06:21Z")

</div>

There have been a few people before you who have tried. If you want to get something to get you started, I recommend checking out these;

[https://forums.unrealengine.com/development-discussion/rendering/115679-3d-capsule-cone-mask-in-material-solution-for-seeing-through-obstacles](https://forums.unrealengine.com/development-discussion/rendering/115679-3d-capsule-cone-mask-in-material-solution-for-seeing-through-obstacles)

> **[Making a cylindrical mask instead of sphere](https://forums.unrealengine.com/questions/218181/making-a-cylindrical-mask-instead-of-sphere.html)**
>
> I've been using a sphere mask to create location based opacity on my materials but what I really need is a cylindrical shape instead. is there a way to make a cylinder mask?

If that doesn’t get you what you want, you may want to check out the math on this page as well. Most if not all of these should be implementable using purely the material functions already present. For the ones that don’t, you could always use a custom node instead;

> **[Inigo Quilez](https://iquilezles.org/www/articles/distfunctions/distfunctions.htm)**
>
> Articles on computer graphics, math and art

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0efb4f1d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0efb4f1d](https://forums.unrealengine.com/u/anonymous_user_0efb4f1d)\
**Post date:** [September 9, 2018, 7:21pm UTC](https://forums.unrealengine.com/t/how-can-i-mask-textures-in-a-cone/433444/3 "2018-09-09T19:21:47Z")

</div>

Well I thought it was interesting, I made a cylindrical mask that can sit at an absolute position in the world, however I have no idea how to make this cylindrical mask rotate to the cone of the flashlight. The links posted only detail how to make a shape, and then transform to camera space, so it would not work for other players to see.

---

<div class="post-metadata">

**Author:** ![tomick87](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tomick87](https://forums.unrealengine.com/u/tomick87)\
**Post date:** [June 19, 2025, 2:29am UTC](https://forums.unrealengine.com/t/how-can-i-mask-textures-in-a-cone/433444/4 "2025-06-19T02:29:37Z")

</div>

I know I’m really late but incase anybody else wants this effect, something like this should fix it. Took me about an hour.

> **[Flashlight/Cone Material Mask posted by anonymous | blueprintUE | PasteBin...](https://blueprintue.com/blueprint/cpi73rkc/)**
>
> No description provided

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/0/fd00398ee7e780734e84def175d82cd1575c947c.png)
