# Trying to make an ultraviolet lamp-like material

**URL:** <https://forums.unrealengine.com/t/trying-to-make-an-ultraviolet-lamp-like-material/71733>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [August 17, 2016, 2:24pm UTC](https://forums.unrealengine.com/t/trying-to-make-an-ultraviolet-lamp-like-material/71733 "2016-08-17T14:24:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_301ba87f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_301ba87f](https://forums.unrealengine.com/u/anonymous_user_301ba87f)\
**Post date:** [August 17, 2016, 2:24pm UTC](https://forums.unrealengine.com/t/trying-to-make-an-ultraviolet-lamp-like-material/71733/1 "2016-08-17T14:24:18Z")

</div>

Trying to make a material, where lit part is rendering normally, and unlit part looks transparent.

Just like an ultraviolet lamp, the character is holding a special colored spotlight (means a flashlight) and there’s some clue on model that could only lit by this light.

So my problem is, how to get the lighting info in material system? Or I have to modify the shading model? Or is there some other ways to get what I desired?

---

<div class="post-metadata">

**Author:** ![Wilkes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wilkes](https://forums.unrealengine.com/u/Wilkes)\
**Post date:** [August 17, 2016, 5:30pm UTC](https://forums.unrealengine.com/t/trying-to-make-an-ultraviolet-lamp-like-material/71733/2 "2016-08-17T17:30:18Z")

</div>

This is just off the top of my head, but I think you could use a sphere mask tied to the world coordinates of your light to control the opacity on the material.

Check out this stream to get the idea: [Depth & Location Based Effects | Live Training | Unreal Engine - YouTube](https://www.youtube.com/watch?v=GXbE0IqbA7w)

The main problem with that is I don’t know how you’d get cast shadows to mask out the areas that they’re being cast on.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_301ba87f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_301ba87f](https://forums.unrealengine.com/u/anonymous_user_301ba87f)\
**Post date:** [August 18, 2016, 2:23pm UTC](https://forums.unrealengine.com/t/trying-to-make-an-ultraviolet-lamp-like-material/71733/3 "2016-08-18T14:23:00Z")

</div>

Thanks a lot, have implemented it with sphere mask + decal material 😉 Really helpful!😃  
I don’t need to mask out the shadow areas because the area lit by spotlight is certainly bright.
