# Measure Brightness of Light on Actor

**URL:** <https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763>\
**Category:** Rendering\
**Tags:** Raycast, unreal-engine, Lightmap, Lighting, question\
**Created:** [February 25, 2020, 3:40pm UTC](https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763 "2020-02-25T15:40:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![reedandrader](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@reedandrader](https://forums.unrealengine.com/u/reedandrader)\
**Post date:** [February 25, 2020, 3:40pm UTC](https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763/1 "2020-02-25T15:40:11Z")

</div>

Hey all,

I have a stealth game where I’m trying to measure the amount of light falling on to a character as it moves around a level. First thought was that there might be some sort of blueprint node that would measure this but I couldn’t find one. Second thought was to raycast to get distance from lights but that seems overly complicated and expensive. Other research seems to involve measuring a volumetric lightmap or doing pixel sampling with a 2D scene capture. Everything I’ve found doesn’t happen to have a clear path that I’m able to follow.

Am I out of luck without diving into C++? Has anyone done anything similar?  
Thanks

---

<div class="post-metadata">

**Author:** ![MJBgood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MJBgood](https://forums.unrealengine.com/u/MJBgood)\
**Post date:** [November 2, 2020, 4:48am UTC](https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763/2 "2020-11-02T04:48:46Z")

</div>

Any luck figuring this out? I am trying to create a game like Tenchu Z and this is a must have feature.

---

<div class="post-metadata">

**Author:** ![Miguel1900](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/miguel1900/32/1010694_2.png) [@Miguel1900](https://forums.unrealengine.com/u/Miguel1900)\
**Post date:** [June 18, 2023, 12:49pm UTC](https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763/4 "2023-06-18T12:49:41Z")

</div>

I was thinking on the scene capture too, so you can “measure” the color of a pixel of the character, having a scene capture 2D component camera infront of the character, for example.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [June 18, 2023, 2:13pm UTC](https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763/5 "2023-06-18T14:13:54Z")

</div>

> [@reedandrader](#):
>
> Second thought was to raycast to get distance from lights but that seems overly complicated and expensive. Other research seems to involve measuring a volumetric lightmap or doing pixel sampling with a 2D scene capture. Everything I’ve found doesn’t happen to have a clear path that I’m able to follow.

I would use line traces personally. Doing GPU readbacks from sampling a render target is going to be very slow by comparison.

---

<div class="post-metadata">

**Author:** ![Miguel1900](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/miguel1900/32/1010694_2.png) [@Miguel1900](https://forums.unrealengine.com/u/Miguel1900)\
**Post date:** [June 18, 2023, 5:33pm UTC](https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763/6 "2023-06-18T17:33:36Z")

</div>

Great, but to ‘read’ what? (with the line trace I mean)

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [June 18, 2023, 5:42pm UTC](https://forums.unrealengine.com/t/measure-brightness-of-light-on-actor/461763/7 "2023-06-18T17:42:25Z")

</div>

Trace from the character to the lightsource if the trace reaches the light then the character is lit, else it is in shadow. I’ve seen people trace from sockets attached to the character to get a better representation than using a single trace.

To determine the quantity of light hitting the character you would calculate that based on the light’s falloff and intensity.

Won’t account for indirect lighting.

There are tutorials all over youtube for this btw, and plugins on the marketplace.
