Skip to content

Finding a good toneMapping profile #1865

@illwieckz

Description

@illwieckz

I personally consider that our current release is broken because tone mapping is enabled in some graphics preset but our default configuration for tone mapping is destroying the render, for both maps built the linear way and all existing maps built the naive way (i.e. Tremulous maps and Unvanquished stock maps, and existing community maps).

When I worked on the linear pipeline, I first thought that tone mapping wasn't compatible with it because I was getting ugly results, and especially enabling tone mapping destroyed details and prevented any white to be rendered, like if the screen was defective.

But in fact tone mapping currently works in the linear pipeline the same way it currently works with the naive pipeline: with legacy maps the result feels unrealistic as well, with details destroyed in the lights and preventing any white to be rendered, like if the screen is defective.

It's just that I always disable tone mapping because with the current configuration it displeases me a lot with the current configuration. Also it's a good idea to test maps without it first, to not let the tone mapping fixing mistakes in the mapper's back.

So when I tested tone mapping with the linear pipeline, I already had forgotten how it looked.

I do want the tone mapping feature, this is a good thing to have and it's a required foundation for other things like adaptative exposure.

But something looks wrong so I guess our current tone mapping default values are wrong. I use a calibrated designer screen with complete sRGB coverage and with tone mapping enabled it's like if the game is rendering with less than 8 bits per channels. Or if the color was clamped to some grey instead of white. Everything feels grey, like if there was some gray filter on the screen.

I toyed with the tone mapping options, here are some results of my experiments, I don't know what they means though.

According to my experience, what is destroying the details in the lit areas and preventing to display white is the r_toneMappingHDRMax option which is set to 8 by default. Setting it to 1 restores the details, the white and restore the full perceived dynamic range. Good maps to test the white areas are parpax, vega and atcshd.

Then on some maps some contrast in the dark colors is too high and yet again feels very unrealistic and disturbing. I said dark colors, not dark lights, so for example the dark gray textures in spacetracks map triggers the annoyance a lot because their diffuse colors are dark. That contrast gives the feeling lighting is broken by turning gray textures into dark areas that looks like they are missing light while they are in rooms with enough light. Another map that suffers from it is station15.

The option to configure that is r_toneMappingContrast and the default value is 1.6. A bit of contrast can be pleasant, so I tested other values than 1. It looks like the range 1.2-1.4 is somewhat safe, with 1.4 it can be a bit too much obvious for people and they may dislike it.
A map like atcshd (the outdoor) is a good map where a bit of contrast darkens a bit the shadow and can be found pleasant. So I did testing comparing the values I tested in both atcshd outdoor and the human base in spacetracks to find some middle ground that would fit everything. The 1.2 value looks safe.

The previous quoted tests were done with linear builds of said maps, but after identifying those values I verified they still kept legacy maps rendering nicely, testing maps like atcszalpha or cleanser, for example, and the tone mapping is still benefiting them with those values.

I remind that the said values should be tested with r_gamma 1, any other value than r_gamma 1 is making any experiment unreliable, especially setting things like r_gamma 2.2 is like doing an approximation of half the linear pipeline, so it would even be more broken than just the naive pipeline as is.

I would like to get the advice of @VReaperV about what those values are and do, and why r_toneMappingHDRMax was set to 8 by default. I need to understand the feature better because we do need to ship a better default tone mapping configuration than the one we currently distribute.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions