Skip to content
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

Something unknown is making our game darker than it should #1151

Open
illwieckz opened this issue Jan 22, 2020 · 11 comments
Open

Something unknown is making our game darker than it should #1151

illwieckz opened this issue Jan 22, 2020 · 11 comments
Labels

Comments

@illwieckz
Copy link
Member

@illwieckz illwieckz commented Jan 22, 2020

unexpected darkness

I discovered that while toying withe the Xonotic's Dæmon glue, a minimalistic Q1VM running on the Dæmon engine.

Unvanquished maps looks brighter when loaded by that other game code running on our engine than they look when they are loaded by our game code on the same engine at the same revision.

It may be a bug on the engine side, but this require our game code to trigger it.

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

@illwieckz

This comment has been minimized.

Copy link
Member Author

@illwieckz illwieckz commented Jan 22, 2020

I first discovered the bug by loading Xonotic maps, and they looked better and except the fact the lightmap is using a colorspace the Dæmon engine does not support yet, they look closer to how they look on DarkPlaces when loaded with Xonotic game code on Dæmon than with Unvanquished game code on Dæmon.

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

Xonotic Glue / Unvanquished

unexpected darkness

unexpected darkness

@illwieckz

This comment has been minimized.

Copy link
Member Author

@illwieckz illwieckz commented Jan 22, 2020

Note that it looks like colorgrading is not applied when running that Xonotic minimalistic game code.

@illwieckz

This comment has been minimized.

Copy link
Member Author

@illwieckz illwieckz commented Jan 22, 2020

The difference of brightness has nothing to do with gamma, as colors are not faded out.

Xonotic Glue:

unexpected darkness

Unvanquished:

unexpected darkness

Unvanquished with increased gamma:

unexpected darkness

@illwieckz

This comment has been minimized.

Copy link
Member Author

@illwieckz illwieckz commented Jan 22, 2020

One can say: everything Xonotic touches becomes gold.

That may be the explanation. 🤔😁

@slipher

This comment has been minimized.

Copy link
Contributor

@slipher slipher commented Jan 25, 2020

I can't tell the difference in most of these. Maybe you could patch in CG_SaveViewpos_f, so that you could use saveviewpos / setviewpos $cg_savedviewpos$ to compare shots from exactly the same locations.

@slipher

This comment has been minimized.

Copy link
Contributor

@slipher slipher commented Jan 25, 2020

Actually if you just started with the Unvanquished cgame and saved the position there, you would not need to patch anything (since setviewpos is an sgame command).

@illwieckz

This comment has been minimized.

Copy link
Member Author

@illwieckz illwieckz commented Jan 25, 2020

The main difference is about fov, how can I change the spectator fov in Unvanquished?

@slipher

This comment has been minimized.

Copy link
Contributor

@slipher slipher commented Jan 26, 2020

Upon a second examination, there are several with a clear difference to me.

@slipher

This comment has been minimized.

Copy link
Contributor

@slipher slipher commented Jan 26, 2020

Looks like you could change the return value of CG_CalcFov().

@Neo-Desktop

This comment has been minimized.

Copy link

@Neo-Desktop Neo-Desktop commented Mar 4, 2020

#221 seems to mention that the HDR pipeline is to blame (as did I think at first glance)
however, there really should be some backward compatibility flag to lighten the map

@illwieckz

This comment has been minimized.

Copy link
Member Author

@illwieckz illwieckz commented Mar 4, 2020

The issue discussed in this thread seems to be unrelated to any HDR pipeline or color management (see Daemon#270 for that other topic) as it looks to be specific to the game code.

The issue discussed in this thread behaves like a filter applied on what the renderer produces. To reword it: this issue is about a darkening layer that looks to be applied above any existing “rendering is too dark” issue. This seems to have nothing to do with map rendering.

As we can see, loading the exact same map with the exact same engine with the exact same options with a different game code produces a less-dark viewport.

The fact maps may be rendered too darky that they should is unrelated to this issue. If we were sure we render maps correctly (and if we do), they would still be darkened by this mysterious grey layer we are talking about there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.