Hello there!
The name’s Dandy, I’m admittedly a bit new to posting on public places like this as somebody who’s mostly been relying on my own knowledge with occasional help from close friends, occasional use of tutorials and often perusing public sources like the forums or online posts to try and seek information. I ended up biting the bullet recently and choosing to create a forum post as admittedly my luck ended up running dry, I’ve been mostly been running into dead ends or into posts like this ( A light that does not emit from a point - #6 by whoozzem and https://www.reddit.com/r/godot/comments/16qmroc/doom_style_lighting_in_godot/) which seem to be an odd mixture of dead ends and explanations that don’t entirely make sense to me: excuse my ramblings, I tend to be a bit talkative! With that being said, I’ve come to here to try and seek some answers in hopes of potentially getting some more information.
Godot Version
I am using Godot 4.6.2.stable.
What am I trying to achieve here?
I threw together a quick in-engine mockup in my Godot project and a quick shoddy picture in Paint to try and explain my plight as clearly as I can. Again, forgive me if I overexplain or if I’m unclear, I’m a bit new to asking public sources for help on matters like this:
To make a long story short: I’ve been working on a project which is heavily inspired by a lot of old first person 3d games, one which I have been extremely dedicated to trying and keep a level of authenticity to. So far, this has gone well: programming the game as a whole has been going quite smoothly, visuals have been mostly no trouble and I’ve not only utilized open source shaders to help sell the look but have even added onto the directional shader I was using, making that into a public resource you can find here! However, I ended up running into a roadblock when trying to account for lighting.
From my experience tinkering myself, Id tech 1 games and a lot of software-rendered 3d games in general at the time were split up into sectors, which also allowed the games to create lighting (.. or an imitation of it). Though this is easy work for a material: just change the color value in the albedo to adjust the lighting of a given split area, this becomes far more tricky when accounting for how sprites should be affected: I am completely unsure as to how I could go about tackling them in a way that would hopefully be optimal and wouldn’t be too taxing on performance.
What have I considered and tried?
My initial hypothesis is that I would have to use Area3Ds and give them their own custom shapes within the areas I would need to change the lighting color for, and then try and detect each and every sprite which enters it. However, the initial way I’ve gone about this implementation made me quickly realize the amount of troubles it’d bring. Unless I were to lock specific sprites to have a specific color, all sprites within an area would have to have some kind of CollisionShape3D to be detected which could get incredibly heavy on performance incredibly fast. Not only that, but the lighting switch could end up being incredibly buggy or inaccurate depending on how I go about it’s implementation, especially between 2 wildly different lit areas. I’ve also considered trying to use shaders to circumvent this issue, though realistically I’m not sure how effective those could even be with my use-case as the only example I can think of which used shaders off the top of my head is Baldi’s Basics: a game which used a vastly different kind of psuedo-lighting technique from what I’m trying to achieve.
What I am seeking
I am simply seeking for some kind of advice as to how I should go about tackling this issue and implementing this kind of system, as it has been an issue I have been stumped on for a while and considering the fact a handful of other posts have asked similar things and have ended up in dead ends, this thread could hopefully serve as useful information for any on-lookers. Though I’m not sure if I will be able to get any answers, I figure it’s worth trying to reach out where-ever I can.
With that being said, if you’re reading this: thank you for taking the time to read my long rambling of a thread and for reading my question! Apologies again if I rambled a bit too much and if I’m unclear. Best wishes to you all and have a wonderful day!






