Making a flashlight. Blinding light when standing near a surface.
On this screenshot I have a flashlight setup - a spot light source with intensity 100 and attenuation radius of 2000. Is there any way to make it not being so blindingly bright when standing next to a surface? I mean, sure I could just lower the intensity, but then it won't illuminate anything further than couple meters.
So far the only thing I could think of is making it toggle between long-range light and short-range light like some flashlights do irl.
But I'm more curious about other solutions to this problem, if anyone has any ideas.
You have two options.
1) Use a ray trace. If it hits a target, calculate the distance and lerp the intensity relative to that distance.
2) Use a light function. https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightFunctions/
answered Aug 03 '16 at 05:40 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here