Jump to content
The Dark Mod Forums
Sign in to follow this  
duzenko

Soft r_gamma

Recommended Posts

I'm sure most of you have a custom r_gamma > 1.0.

It has an unfortunate side effect that all windows are overbrightened and bleached when you alt-tab from TDM.

For that reason I myself have for a long time stopped using r_gamma.

However sometimes a map is so dark that I wonder if the author was designating it to be played with high gamma value (e.g. Old Habits 1).

I'm going to put a new uniform to the ambient interaction shader that would brighten up ambient lights using r_gamma cvar value. At the same time I will disable device gamma ramp in regards of gamma. "Normal" point lights will ignore r_gamma from now on, as well as GUI's, etc.

This will affect the svn version, not 2.06.

 

Another problem this should reduce is color banding. Gamma ramp makes banding more visible due to relatively higher steps between dim color shades.

 

Please comment.


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites
I'm going to put a new uniform to the ambient interaction shader that would brighten up ambient lights using r_gamma cvar value. At the same time I will disable device gamma ramp in regards of gamma. "Normal" point lights will ignore r_gamma from now on.

 

How would that affect the gamma setting room in the Training Mission?

Share this post


Link to post
Share on other sites

I make all my textures and materials for ambient_world with brightness 16 and default gamma 1.2 (I can use gamma 1.0 to get better contrast or e.g. when I play in the evening). Will that affect my textures or materials in any way?

Share this post


Link to post
Share on other sites

I make all my textures and materials for ambient_world with brightness 16 and default gamma 1.2 (I can use gamma 1.0 to get better contrast or e.g. when I play in the evening). Will that affect my textures or materials in any way?

I don't think so

 

How would that affect the gamma setting room in the Training Mission?

Probably it won't

Thinking about that - does it make any sense to have a gamma room in Training mission at all considering new players will have gamma setting on its default value? Do we actually expect different visibility on different monitors in digital LCD era? I think that's what people did on CRT's 10+ years ago.

  • Like 1

Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

So you're saying that the lights in a mission will be directly adjusted by the gamma value the player sets in the menu? Won't that mean that the gamma value would suddenly start impacting player visibility?

Share this post


Link to post
Share on other sites

So you're saying that the lights in a mission will be directly adjusted by the gamma value the player sets in the menu? Won't that mean that the gamma value would suddenly start impacting player visibility?

Good question.

Do ambient lights contribute to lightgem? I think not. @nbohre1more?

If so, no change, otherwise lightgem calc output will have to be adjusted accordingly OR gamma shader skipped during lightgem stage.


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

A gamma change that affects light and ambient light brightness will affect an AIs ability to spot missing items. This is a change in gameplay.

 

I dont remember if the lightgem is affected by ambient lights.

 

It looks to me like the number of things this change would affect and probably require further code changes to mitigate is decreasing the need to make the change.

Share this post


Link to post
Share on other sites
Do ambient lights contribute to lightgem? I think not. @nbohre1more?

 

 

Yes, they do.

Share this post


Link to post
Share on other sites

A gamma change that affects light and ambient light brightness will affect an AIs ability to spot missing items. This is a change in gameplay.

 

I dont remember if the lightgem is affected by ambient lights.

 

It looks to me like the number of things this change would affect and probably require further code changes to mitigate is decreasing the need to make the change.

Not sure what you mean my light brightness. The change I did is about pixels on the screen. Unless AI somehow reads pixels...


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

 

Yes, they do.

Do you mean that simple and advanced ambient (that produce different output color on the screen) also affects lightmap output value?


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

Ambient world sets a default light value for the map. AI read that light value when determining whether they can see the player or not. I traditionally make the ambient_world light value brighter on higher difficulties in my map so that AI can see the player more easily.

 

If your change increases the light value based on the player gamma setting, then it is going to affect how AI see the player (and everything else).

Share this post


Link to post
Share on other sites

Ambient world sets a default light value for the map. AI read that light value when determining whether they can see the player or not. I traditionally make the ambient_world light value brighter on higher difficulties in my map so that AI can see the player more easily.

 

If your change increases the light value based on the player gamma setting, then it is going to affect how AI see the player (and everything else).

If you're talking about lightgem here, I would still like to hear about enhanced vs simple ambient.


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

Thinking about that - does it make any sense to have a gamma room in Training mission at all considering new players will have gamma setting on its default value? Do we actually expect different visibility on different monitors in digital LCD era? I think that's what people did on CRT's 10+ years ago.

There are people without OLED displays out there and for them backlight bleed is still a thing. It heavily depends on the panel, how much the backlight bleed reduces contrast for darker areas. Actually, some CRTs and especially the plasma TV sets where better than current TFT in this regard as there was no permanent backlight, that could have shined through "black" dots. So until we all got OLEDs, gamma correction will keep beeing a thing - especially in darker games like TDM.

 

And there also are personal differences in taste and physical ability when it comes to distinguishing the darker shades of grey. That will certainly grow a bit as some of the audience of TDM gets older and therefore less good vision.

Edited by Abusimplea

Share this post


Link to post
Share on other sites

If you're talking about lightgem here, I would still like to hear about enhanced vs simple ambient.

 

I'm not really sure what you're asking.

Share this post


Link to post
Share on other sites

 

I'm not really sure what you're asking.

You say ambient lights contribute to lightgem.

The ambient/simple ambient affects brightness of ambient lights on different surfaces - were you aware of this?


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

AFAIK, ambient lights work just like "vertex lights" in Thief 3: they're cheap, because they both don't cast shadows and they ignore brush/mesh faces. And they affect lightgem as any other light would do. Ambient_world is basically ambient brightness, it sets the color and brightness for the low-end of the output light range in a level, so you don't get pitch-black shadows, and this obviously affects the lightgem as well. You can set it to something like RGB 64, and you can have a dawn/daylight mission, and the lightgem will react accordingly, as well as AI.

 

As far as I've seen with my WIP map, there's no visible difference between Ambient Rendering option set to Enhanced and Simple. Btw. when you change Interaction shader between Default and Enhanced, there's a difference in how my speculars work though, they look better with Enhanced.

  • Like 1

Share this post


Link to post
Share on other sites
The ambient/simple ambient affects brightness of ambient lights on different surfaces - were you aware of this?

 

 

Ambient and simple rendering was designed to be as similar as possible. There are a few minor differences on some textures, but nothing that should have an impact on AI vision.

 

Revision: 7348

r_gamma in GLSL skipped for lightgem

 

 

What about AI noticing things like bodies, ropes, or missing loot? That is also affected by ambient lights.

 

Wouldn't it be a good idea to sort out how (and if) this works before adding it to SVN?

  • Like 1

Share this post


Link to post
Share on other sites

Since this change, I'm getting spotted all the time and the lightgem is too bright for my location.

You'll need to make some sort of lightgem offset to counter balance.

 

I was actually thinking of a similar system but not as a replacement for gamma and instead

just a way for players to control the ambient_world light to taste. Similar offset would be required though.


Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Share this post


Link to post
Share on other sites

You say ambient lights contribute to lightgem.

The ambient/simple ambient affects brightness of ambient lights on different surfaces - were you aware of this?

 

I was, your gameplay experience is actually different depending on which ambient method you use, normal or enhanced. The lights change brightness and affect the lightgem.

 

I thought this was about just divorcing our gamma slider from the Windows gamma one, which would be sane enough on its own. On paper this sounds like not that bad of an implementation of a "soft gamma" in order to eliminate the ugly banding.

 

Of note is that a mapper could choose to place a texture other than an ambient light as their ambient_world, a map could also have no ambient lights at all. It's a fringe case, but something to keep in mind.

 

Every type of light contributes to visibility, unless it has ai_see 0 set on it. If you want to do anything with them, that's something worth looking into, or the lightgem adjustment mentioned in the previous post. How you'd make it conditional to only ambient lights, I don't know.


My FMs: The King of Diamonds (2016)



| Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM! |

Share this post


Link to post
Share on other sites
I was actually thinking of a similar system but not as a replacement for gamma and instead

just a way for players to control the ambient_world light to taste. Similar offset would be required though.

 

That seems like a bad idea to me. Mappers and modelers set and change ambient_world so it matches the location, textures, materials, etc. And it affects lightgem / visibility, so it's also a gameplay-related feature. Giving that ability to players would break things.

  • Like 1

Share this post


Link to post
Share on other sites

Since this change, I'm getting spotted all the time and the lightgem is too bright for my location.

Does simple ambient fix it?


Amnesty for Bikerdude!

Share this post


Link to post
Share on other sites

I tested AI noticing a missing object both in 2.05 and SVN.

 

I measured the amount of light hitting the object, and in both cases it was nearly the same (2.05 = 0.388595, SVN = 0.388700).

 

So it doesn't look like this change affects the amount of light cast on a missing object.

 

I cranked up the gamma and brightness in the menu with no change in SVN results.

 

I still don't think I'm clear on whether this is just a "pixels on the screen" change or it will "brighten up ambient lights". These seem like contradictory statements, the latter making it sound like ambient lights in the game will now be brighter and affect the amount of light falling on objects, which affects AI being able to see them.

 

I think the confusion in the comments on this thread stems from an incomplete description of exactly what's changing.

 

Please clarify.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...