Sun light source
Posted: Thu Jul 27, 2017 3:29 am
I was telling dpJudas on Discord yesterday about how I ran into this problem. I figured it would be better to make an open suggestion thread because it involves more than the model and lighting code.
What I proposed on Discord was the ability for modders to specify a single, infinitely-distanced "sun" light source that would light everything sector-wide. This would be a UDMF control (so ZZYZX can add UI to control it in GZDB-BF), to allow mappers to control the light design.
Alternatively, Chris suggested making the sun map-wide instead of per-sector. My motivation of making it per sector is, you may want to have an indoor area beside an outdoor area (think of Strife's town map)... they all shouldn't have the same lighting direction.
The problem with Doom lighting is there are no light sources, so everything is lit uniformly. See this example image:
The only way to light those trees in this scene is to continuously place dynamic lights close to each other, just to provide something for the lighting shader to draw with. This isn't practical, and not to mention spamming dynamic lights all across that map is expensive.
Please note that I know the scene I made is excessive in terms of visible thing count, but this is just an exaggerated example. In a real mapping situation, of course I won't spam things in view with no blocking lines, but that's beside the point of this suggestion.
(By the way, even for a smaller scene, placing dynamic lights continuously isn't practical... the lighting would look wrong because it's coming from so many directions. It doesn't look good; I've already tried doing it)
The point is that, I'm suggesting a single light source that would globally light things in a sector, with infinite distance.
Parameters:
Light colours R, G B
Angle
Pitch
This would be a mapping feature. Existing Doom maps and mods won't be affected, and will continue to use uniform lighting for models.
Link to test file will be provided in the dev thread.
What I proposed on Discord was the ability for modders to specify a single, infinitely-distanced "sun" light source that would light everything sector-wide. This would be a UDMF control (so ZZYZX can add UI to control it in GZDB-BF), to allow mappers to control the light design.
Alternatively, Chris suggested making the sun map-wide instead of per-sector. My motivation of making it per sector is, you may want to have an indoor area beside an outdoor area (think of Strife's town map)... they all shouldn't have the same lighting direction.
The problem with Doom lighting is there are no light sources, so everything is lit uniformly. See this example image:
The only way to light those trees in this scene is to continuously place dynamic lights close to each other, just to provide something for the lighting shader to draw with. This isn't practical, and not to mention spamming dynamic lights all across that map is expensive.
Please note that I know the scene I made is excessive in terms of visible thing count, but this is just an exaggerated example. In a real mapping situation, of course I won't spam things in view with no blocking lines, but that's beside the point of this suggestion.
(By the way, even for a smaller scene, placing dynamic lights continuously isn't practical... the lighting would look wrong because it's coming from so many directions. It doesn't look good; I've already tried doing it)
The point is that, I'm suggesting a single light source that would globally light things in a sector, with infinite distance.
Parameters:
Light colours R, G B
Angle
Pitch
This would be a mapping feature. Existing Doom maps and mods won't be affected, and will continue to use uniform lighting for models.
Link to test file will be provided in the dev thread.