Hello, I was wondering how you would go about getting the brightness of light falling on an actor and turning it to a usable numerical value in a blueprint?
Hey there @ianmcclain! Welcome to the community! So generally there’s no native way to look for exact light level. There’s a couple approaches you could use, but in blueprint it’s somewhat limited. Though the most promising (and less expensive) blueprint based way I’ve seen this tackled is from Hippowombat:
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
If that’s not your cup of tea, here’s’ a thread where some solutions are talked about:
I’d do a ray trace to see if I’m getting light from it, and then if so, get distance. You can then use the distance to calculate with variables in the light to get a brightness amount. For instance, percentage of the source radius times the intensity etc.
You could then add values from various lights.
Or you could have the light get all actors in radius and apply a value to them based on their distance if they are visible.
It depends on if you have hundreds of different actors and a few lights, or 1 single type of actor and very few with numerous lights. D4epends on if they are moving too.
I’d go with the smallest amount of things you need to apply the code to. But that’s me. Maybe It’s a weird way to do it and there is a node that “Get Actors light exposure.” LOL