QW-Group / ezquake-source

main ezQuake source code base
https://www.ezquake.com/
GNU General Public License v2.0
265 stars 122 forks source link

REQ: Better support for Skyboxes [mapping] #629

Closed inf1niti closed 2 years ago

inf1niti commented 2 years ago

Is your feature request related to a problem? Please describe. Skyboxes can only be loaded in EZQuake manually by the end-user, by having them enter a r_skyname value. Since skyboxes are often meant to be loaded with specific map (instead of globally), this doesn't usually make sense.

Furthermore, the orientation of the skybox in ezquake does not match that of other engines. This is problematic when a map's sunlight_mangle value is set to match the skybox.

Describe the solution you'd like Ideally skyboxes load automatically on map load from the worldspawn _sky property (if present). The end user should still be able to decide whether they want to load this - for example, other engines will load skybox by default unless r_fastsky 1 is selected. Orientation of skyboxes should also be consistent with other engines.

Impact on server or mods This should have no real negative impact. If a user likes to use a custom sky as a fallback when a map doesn't specify a skybox, the r_skyname value should still be supported. If a user doesn't like loading skyboxes, they should have the option to disable it in their config.

meag commented 2 years ago

Can you supply an example .bsp with the worldspawn _sky property? Also: "Orientation of skyboxes should also be consistent with other engines" - can you supply example assets, and are you saying the orientation of existing uploads to gfx.quakeworld.nu etc are also rendered incorrectly?

inf1niti commented 2 years ago

Example Map

I have a WIP map that uses the _sky property. It's not the best example (it's a big map), but it is packaged with the skybox being used.

Usage & Support

The _sky key in the worldspawn has become a standard key in SP engines, and is commonly used for referencing skyboxes in the single player mapping community. If you check out the maps in any of the major SP mods (AD, Alkaline, Dwell, etc.) they use this key to ref skyboxes as well.

QS, QSS, FTE, MHQuake, VKQuake, Ironwail (and likely other engines), support loading skyboxes from the worldspawn with this key. Example of worldspawn skybox loading in QSS.

Skybox Orientation Issue

re: orientation, using the map provided above as an example you can see the effect I'm talking about. Skyboxes are standardized file sets: they just a series of 6 image with _bk, _lf, _ft, _rt, _up, _dn postfixes. As such any asset (whether uploaded to gfx.quakeworld.nu or not) would experience the same orientation inconsistency mentioned here.

Engine Screenshot
QSS qssm0496
FTE fte-20220128231237-0
VKQuake vkquake0002
QRack qrack998
EZQuake ezquake032

Further details from discussion on discord with Lurq image

zigg1zagg1 commented 2 years ago

I guess it would make sense to support per map fog settings also? Most singleplayer oriented quake engines support setting custom fog values with a fog key in the worldspawn, similar to how skyboxes are done.

Seems like fog is bugged in the new renderer tho, so maybe this is something to add later.