I’m currently working on a lighting system that will automatically set the exposure of lighting depending on what is displayed on screen, and what the player is focused on.
My goal with this script is to achieve more immersive and realistic lighting conditions in my games.
EDIT: Updates -
-- Fixed flickering while moving
-- Added more focal points to average the exposure between
-- Adjusted the exposure value of the sky, so being outside is just like normal roblox lighting
-- Light objects and neon parts are also taken into account when adjusting exposure
This is essentially the peak of realism in lighting for me to see, the fact that you’ve gone through the effort of having this simple but extremely effective effect.
This can relate to me looking out of the window after a whole day of sitting in a chair, only for my eyes to catch the sun & burn in despair.
Really looking forward to seeing what’s to come for the future of this lighting system!
The automatic exposure is pretty cool. I like what you’re creating! What I would try to focus on is how quickly the exposure changes. When I was playing the game and just walking around, my screen kept getting bright then dark, making it kind of nauseating.
Firstly performance is more affected by the length of the ray, rather than the amount of rays.
Secondly I have to cast more than 1 ray per focal point. First I have to raycast forward to find the focal point and the color of the surface the client is looking at. Then I have to have a really long ray casting from that point, to the sun’s position to determine how shaded the focal point is, and I need to do another long ray to determine how shaded the foreground is, etc.
The effect still doesn’t work very well if you can’t stare at the end of a tunnel without the effect assuming you’re looking at the sky. that’s my main issue, plus everything working rampantly and probably giving me eye strain outside of the tunnel. there’s plenty to improve, i just thought collecting data from the whole screen would be part of the improvement.
Well achieving ultimate realism isn’t really possible at the moment, and it’s made even more difficult by the fact that I can’t just detect the color of any given pixel, I have to detect the color of the part and combine it with a lot of estimations based on the current lighting condition, before I can properly determine how far from middle gray the pixel is.
About the tunnel sky issue though, since there are no bounding walls to the map, if you look outside the tunnel you are literally looking at the sky.
This is awesome. I feel like you should make the exposure adjust slower and maybe add a bit of delay just to make it more realistic. Are you gonna release the script?