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

Renderer: unused features, untested features, and unported features #662

Open
illwieckz opened this issue Jul 29, 2022 · 11 comments
Open

Renderer: unused features, untested features, and unported features #662

illwieckz opened this issue Jul 29, 2022 · 11 comments

Comments

@illwieckz
Copy link
Member

illwieckz commented Jul 29, 2022

One a side note of this:

Remove sunShader and flareShader. They are only used in ET and not
actually used anywhere in the engine. They just spam us.

I would like to know what those features were for and if we can benefit from them.

We have many things that are not working and because we don't use them no one fixes them or port them, and with time they just get deleted.

  • we have water code, but it is currently partially broken, we can see there we had one day a working implementation (maybe in a branch, though): https://unvanquished.net/the-human-model-and-new-map-features.
  • we have cubemapping with automatic cubemap generation, it's mostly working now, however some issues still remain, see Static reflections issues #1310.
  • we have HDR lightmap code, untested, some code was even removed when doing clean-up: Remove unused libs/openexr #467 . For information the related q3map2 code exists in our old daemonmap (wolfmap), there also exist another q3map2 patch by some OpenJK developers.
  • we have something that may be direct sunlight or direct sun shadow I don't know but no one knows if it had ever worked once, and it has to be ported over the tiled renderer.
  • we have dynamic shadows but they were badly broken and they have to be ported over to the tiled renderer.
  • the PBR code is untested and is likely wrong (I suspect the roughness to be inverted, if yes it's easy to fix, I suspect the metalness to be wrong, I don't know the fix).

I would like to nuke the old forward renderer one day, but then we would nuke code we want to port.

The only successful feature restoration and fix (XreaL was wrong) I know was the parallax mapping stuff:

Screenshot with working water texture from 2012 (Citadel map):

water

@ghost
Copy link

ghost commented Jul 29, 2022

we have water code,

would be nice to have. None of unv's official maps really use water, but several trem maps do.

we have direct sunlight but no one knows if it had ever worked once, and it has to be ported over the tiled renderer.

Most maps from trem and unv that unv are don't really feature exteriors, or they're a detail. I think this could be dropped.

we have dynamic shadows

Current stuff is to use blobs. It's quite ugly, though, so I'd say real shadows would be nice, but we can live without it, I guess.

Of course, this is the PoV of a player only, as I don't hack the engine.

@illwieckz
Copy link
Member Author

On the other hand people may start to use features once they work.

And we know that: Unvanquished maps do not rely on darkness because we don't have a proper way to render nice dark lightmaps (either HDR, either sRGB). That's the perfect example of “things that looks bad are avoided”.

@illwieckz
Copy link
Member Author

illwieckz commented Jul 29, 2022

Here is an example of how looks ATCS (not HD) map on Q3 tremulous mod on ioquake3 with classic lighting:

ioquake3 tremulous atcs forcesun

Here is an example of how looks ATCS (not HD) map on Q3 tremulous mod on ioquake3 with r_forceSun 1:

ioquake3 tremulous atcs forcesun

Also not that it does not benefit from specular/normal/relief mapping here as none of this is implemented.

@illwieckz illwieckz changed the title Renderer: unused features, untested features, and unported feature Renderer: unused features, untested features, and unported features Jul 29, 2022
@DolceTriade
Copy link
Contributor

DolceTriade commented Jul 29, 2022

Wow this would be really cool to have in Unv, what features are being used there?

@illwieckz
Copy link
Member Author

illwieckz commented Jul 29, 2022

  • in Citadel screenshot: only some supposedly old Dæmon's water GLSL shader, the material was probably edited to produce the screenshot (I don't know who did it),
  • in ATCS screenshot: only the ioquake3 sun GLSL shader (the data is unmodified).

Both maps are legacy maps done the Quake 3 way without any other fanciness we may support.

@illwieckz
Copy link
Member Author

Current stuff is to use blobs.

@bmorel other options are not listed in menu on purpose because they are broken AND they are supposedly not compatible with our new renderer anyway. Because the old renderer isn't used it isn't tested and it may be broken because it rots while we edit other things in newer renderer.

You can see some examples of nice shadows on those screenshots from 2014/2015 (alpha 34, 41, 42):

dynamic shadows
dynamic shadows
dynamic shadows

@DolceTriade
Copy link
Contributor

Shadows was always on our wishlist and we never got them working because we never had a performant dynamic light implementation. We no longer have anyone with real graphics expertise (maybe slipher? :D)

@illwieckz
Copy link
Member Author

illwieckz commented Jul 29, 2022

We may want to summon @gimhael, @Amanieu and @cmf028! 😁️

@Kangz has good graphics expertise too, but I would prefer to see him focusing on the port from NaCl to Wasm. 😉️

I remember @cmf028 even had a work-in-progress raytracing code (2019). 😲️

raytraced lightmap

There was also some experiment about lightmap filtering (2019):

lightmap filtering

About shadows, see also https://imgur.com/hVxHh,ZnLTa,YIRTN (2012):

dynamic shadows

@DolceTriade
Copy link
Contributor

If we can summon some of our older devs, that would be amazing :D

@slipher
Copy link
Member

slipher commented Oct 5, 2024

Apparently at some point, a subset of non-blob shadows were made to work while tiled mode was enabled, by just using the forward lighting code for them. Specifically, "inverse dynamic lights" which are added by the cgame for players and buildables. a09f03b

@VReaperV
Copy link
Contributor

VReaperV commented Nov 1, 2024

Remove sunShader and flareShader. They are only used in ET and not
actually used anywhere in the engine. They just spam us.

I saw some flare code somewhere, I wonder if it's leftover from that and should be removed...

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

No branches or pull requests

4 participants