Download

Light Intensity on Actor Darkness Insanity Mechanic

Hello! I wanted a kind of mechanic that when the player is in darkness, they slowly become insane (scary camera post process effects, sounds, etc.) like in Amnesia The Dark Descent. I was wondering if there was any way I could find the intensity of light that is falling on my player. With that I can connect that to a value that slowly counts down making the camera effects and sounds become more intense. I don’t know if there is a specific node that does this and if there is it probably goes by some complicated and technical name. With this, one could also make a stealth mechanic wear the player is undetected if in darkness. This would be an interesting mechanic and could really spice up any horror game and whatnot. If anybody has an idea on how to make such a mechanic, I look forward to seeing how you guys would do so. Thanks! :slight_smile:

I am also wondering if there is a way to find light intensity, with dynamic lighting of course. +1

Hello,
Maybe this tutorial can be a basis : Simply blueprint detecting if player is in light. - Community Content, Tools and Tutorials - Unreal Engine Forums

Thanks! That link was quite helpful. I’ve set it up so instead of two line traces I only have one it works perfectly.fec9b80575c01b655141865a80c801571d225876.png1f552ce642d48801bbd63477c63722ba858806c2.png

The only problem I have is that when I have two of these lights with intersecting detection radii it may read one as the player is in the dark and the other says he’s in the light.c588d9a2476dced0f69baad7d89a730f95367702.jpeg There is probably a way one could somehow say that when the player is in any light, set all in lights to true. Any idea on how to do that would be awesome. To get that kind of Amnesia-y effect, one would have to put that blueprint on most if not all light sources which could cause performance issues but I’m not entirely sure. Other than that it works fine. If there is a better more efficient way to make this work, post it here so we can start improving this. Thanks!

Does anyone have an example of changing the post process when you enter and exit light (similar to Amnesia)?

You can make a post process volume over the whole map and just enable or disable it whenever you need it. You could also add post process to your camera, but keep in mind that when you switch cameras then the post process is obviously gone.