Horror game flashlight problem

Hello, spotlight in my horror game looks unreal. There are dark spots in the corners and in front of objects. (take first picture with red shapes in it). Also I take a photo of my room with turned flashlight on and everything is perfectly illuminated. The only thing that I hate on horror games is bad flashlights. How to make it real? Thanks! [SIZE=2][SIZE=1]and please forgive my english.[/SIZE][/SIZE]Bez názvu.png e17edc56479b9130eefc890ae1d8e239264612b0.jpeg

you could try to make an addative decal be the flashlight and not use an actual light, or reduce the real light, but honestly I don’t know why the light seems so different on the roof and floor.

One solution I’ve considered (though not tried yet) would be to use an additional dynamic pointlight appear near the surface where the flashlight beam hits, to simulate some additional bounced light. The idea has obvious drawbacks in terms of performance of course, but might be worth exploring.

The basic procedure would be:

  1. Run a linetrace from the flashlight (up to some maximum range, probably equal to the range of the spotlight).
  2. If the trace hits some geometry, then move back from the hit location a bit along the trace vector and store that position.
  3. If the trace does not hit anything, just store the endpoint of the trace.
  4. Place a small pointlight at the position.

For extra credits (and even worse performance), you could also trace a reflected vector from the original hit position, and then place an even dimmer pointlight at the end of that secondary trace. Optionally rinse and repeat (second bounce, third bounce) until everything turns into a slideshow :slight_smile:

If im not wrong you have a options in your spot light, they are called inner and outer cone ange, try to tweak them and you should be good!
Second option… simply use a IES file in your light… you can find like a million free IES files by searching gogole.

The first picture is actually with IES file. Also results with tweaking inner and outer cone angle are same. Now I’ll make some experiments that Xenome and daveSchoneveld suggested.

For example S.T.A.L.K.E.R. game have pretty nice solution. They use “light cookie” texture and it works just like a flashlight.


I just completed a quick-and-dirty test of my proposal, and… nah… a naive implementation doesn’t give very good results. For starters, the linetrace definitely needs more than one sample in a few different directions radiating from the source to get some sort of “average hit location”, and then you get all sorts of complications to consider. While the idea works in principle, as a way to get an approximation of bounce light around the main target of the light, it would take quite a serious effort to get something that looks natural, particularly when moving the flashlight around quickly in any sort of complex interior.

If you’re not interested in investing a lot of time, I’d advice against trying my suggestion.

So I uploaded a video and also I tried the same thing in Cinema 4D… looks pretty same.
The best result are when the wall is facing towards the light… I think the best solution will be with decals. maybe Im wrong.
Xenome: I do not mind if it will take some time. But I dont want that this stupid flashlight have too much HW requirements.