-
Notifications
You must be signed in to change notification settings - Fork 63
WIP: set a minimum amount of lighting #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Note: for some unknown reason I have to delete |
Note that when maps are not really contrasted with this feature it just means the given maps have very low light, since it would mean that the average light of the given scenes would be very near the color step from where the grey becomes pure black… |
Well this is a great cheat code for the humans 😛 Do we really want to have settings like that though? Which give an advantage to people who know to turn them on? Alternatively, it could be turned on by default, but it seems bad that the renderer is not faithfully rendering what the output image should be according to the inputs. |
I must say I am unable to see a difference between your screenshots. That's probably my fault I guess, between strong redshift, low screen luminosity, and a laptop screen. But that also means those area are still pitch black for me :X |
Just as a note, I've been thinking of writing a shader for alien nightvision; and some are considering torchs https://forums.unvanquished.net/viewtopic.php?f=33&t=2097&p=17541#p17682. Maybe that could be a way to go? |
Your hardware's fault, you're fine. 😁
About color banding, three things are currently evaluated: dithering (fake gradient by mixing pixels), sRGB lightmaps (better colorspace that is less aggressive on low values), HDR lightmaps (more data means less banding). About the feature itself, games like The Dark Mod reveal some game may want to have such feature anyway, so as a standalone engine it may be good to offer that option, but without an explicit need that's a low priority. |
What was that hack (the black texture) used for? Also, I like the results on the screenshots. The difference is clear, it might even make some maps actually playable (hangar28), but this needs to be on by default, if we let this feature slip in gamelogic. |
There is now, in #1550. Funnily enough, the arbitrarily chosen 0.18 value here is mid grey, and is used by default as the dark-area point cut-off in #1550. It also doesn't break the black texture thing. |
The last time I updated The Dark Mod, I got a bug: there was no lighting. But I noticed everything was still visible. So I discovered that this stealth game relying a lot on darky zones never has pure black dark zones:
I remembered the usual complain about the Unvanquished game being too darky, and I thought the idea was nice and I wanted the feature in Dæmon too, it's a gameplay issue.
Then I was yet another time annoyed by the ugly darky blotches of our non-sRGB lightmaps. And then the light came to my mind. If there is no pure dark zones, there can't be dark blotches.
Dark blotches come from the fact the current color curve does not have so much steps in the dark part, hence the shadows coming from average grey to pure black in one step.
So I implemented this hack. For every shadow color component between
0
and0.18
, rescale it between0.06
and0.18
. The0.06
value was chosen the empirical way by testing with some maps suffering a lot from the bug, and some other maps to ensure nothing wrong occurs. The0.18
value was arbitrarily chosen without much thinking.I really have no idea about the way to name this feature. Currently, the cvar is named
r_floorLight
, I highly recommend yourself to try this.It's an easy hack to greatly improve the looking of our maps. sRGB lightmaps will tamper the need for such hack for good looking purpose, but since it's a good feature to always keep a minimum amount of light, it may be good to keep the feature and just adjust the numbers for the sRGB curve.
Note: it looks less good in thumbnails because the dark stuff being less contrasted, but it looks better in game this way:
There is one issue though, the usual "black" texture hack does not work anymore (well, the texture works, but the illusion does not work anymore):