Updated changelog for upcoming release

This commit is contained in:
Robert Beckebans 2021-05-03 14:41:30 +02:00
parent 544ea11ce1
commit 7d5c840ec3
4 changed files with 161 additions and 29 deletions

View file

@ -15,12 +15,12 @@ Thank you for downloading RBDOOM-3-BFG.
_______________________________________
TBD Q1/2021 - RBDOOM-3-BFG 1.3.0 - Changes since RBDOOM-3-BFG 1.2.0
11 May 2021 - RBDOOM-3-BFG 1.3.0 - Download it from the [RBDOOM-3-BFG ModDB Page](https://www.moddb.com/mods/rbdoom-3-bfg)
_______________________________
<img src="https://i.imgur.com/iQjLKzx.png">
# RBDOOM-3-BFG 1.3.0 adds PBR rendering and TrenchBroom mapping support
# RBDOOM-3-BFG 1.3.0 adds PBR, Baked GI and TrenchBroom Mapping Support
## Physically Based Rendering
@ -28,26 +28,95 @@ Implementing Physically Based Rendering (PBR) in Doom 3 is a challenge and comes
The light rigs aren't made for PBR but it is possible to achieve good PBR lighting even with the old content by tweaking the light formulars with a few good magic constants. However I also want to support the modding scene to allow them to create brand new PBR materials made with Substance Designer/Painter or other modern tools so multiple rendering paths have been implemented.
## Extra Ambient Pass using Image Based Lighting
PBR allows artists to create textures that are based on real world measured color values and they look more or less the same in any renderer that follows the PBR guidelines and formulars.
From an artistic point of view PBR allows artists to create textures that are based on real world measured color values and they look more or less the same in any renderer that follows the PBR guidelines and formulars.
RBDOOM-3-BFG only supports the PBR roughness/metal workflow.
***RBDOOM-3-BFG only supports the standard PBR roughness/metal workflow.***
The main goal is that the new content looks the same in RBDOOM-3-BFG as in Blender 2.9 with Cycles or Eevee.
## Baked Global Illumination using Irradiance Volumes and Image Based Lighting
To achieve the typical PBR look from an artistic point of view it also means to that it is necessary to add indirect lighting. Doom 3 and even Doom 3 BFG had no indirect lighting.
RBDOOM-3-BFG 1.2.0 already had indirect lighting similar to Quake 4 which used a fixed light direction.
This new version distributes automatically environment probes through the maps using the BSP area bounds.
The main goal is that the new content looks the same in RBDOOM-3-BFG as in Blender 2.9x with Cycles or Eevee.
The environment probes use an octahedron encoding and the specular mipmaps are convolved using the Split Sum Approximation by Brian Karris [Epic 2013].
```
To achieve the typical PBR look from an artistic point of view it also means to that it is necessary to add indirect lighting.
Doom 3 and even Doom 3 BFG had no indirect lighting.
```
### Irradiance Volumes aka Light Grids
RBDOOM-3-BFG 1.3.0 brings back the Quake 3 light grid but this time the grid points feature spherical harmonics encoded as octahedrons and it can be evaluated per pixel. This means it can be used on any geometry and serves as an irradiance volume.
<img src="https://i.imgur.com/DKoBaP6.png" width="384"> <img src="https://i.imgur.com/Yrhh28g.png" width="384">
Lightgrids can be baked after loading the map and by typing:
```
bakeLightGrids [limit]
```
This will generate a ***.lightgrid*** file next to your .map file and it will also store a light grid atlas for each BSP area under ***env/maps/<path/to/your/map/>***
<img src="https://i.imgur.com/HeXnVLs.jpg" width="640">
Limit is 4096 by default and means the maximum number of light grid points in a single light grid.
Quake 3 had one light grid that streched over the entire map and distributed lighting every 64 x 64 x 128 units by default.
If the maps were too big then q3map2 made the default grid size broader like 80 x 80 x 144, 96 x 96 x 160 and so on until the maximum number of light grid points was reached.
The Quake 3 approach wouldn't work with Doom 3 because the maps are too big and it would result in up to 800k probes for some maps or the grid density would very coarse.
RBDOOM-3-BFG uses the bounding size of the BSP portal areas and puts and smaller light grid into those BSP areas.
<img src="https://i.imgur.com/pTR06dH.png" width="640">
This way we can maintain a good grid density and avoid wasting storage because of light grid points that are in empty space.
> But what is an Irradiance Volume or Light Grid exactly?
It tells each model or lit pixel how the indirect diffuse lighting is coming from any direction. The Probulator page by Yuri O'Donnell has some good examples:
Left: The captured view using a panorama layout. Right: The Diffuse lighting using Level 4 Spherical Harmonics aka Irradiance.
<img src="https://i.imgur.com/4i52c4k.png" width="384"> <img src="https://i.imgur.com/Qq2HYuK.png" width="384">
Now think of this for each of the grid points in RBDOOM-3-BFG. If a model is placed between those probes the lighting will be interpolated by the nearest 8 grid points similar like in Quake 3.
Quake 3 only stored the dominant light direction, the average light color of that direction and an ambient color term for each grid point.
In RBDOOM-3-BFG you basically can have the diffuse lighting information for **any** world space direction instead.
This is a way more advanced technique.
### Image Based Lighting and Environment Probes
Environment probes supplement the light grids. While light grids provide diffuse lighting information the signal isn't good enough to provide specular lighting. This is where environment probes are needed. There are less of them
If an level designer doesn't put any env_probe entities into a map then they are automatically distributed through the map using the BSP area bounds and placed in the center of them.
Environment probes can be computed after loading the map and by typing:
```
bakeEnvironmentProbes
```
This will generate EXR files in ***env/maps/<path/to/your/map/>***.
The environment probes use an octahedron encoding and the specular mipmaps are convolved using the Split Sum Approximation by Brian Karris [Epic 2013]. Convolving the environment probes is done on the CPU using the id Tech 5 multi threading code so it will consume all your available cores.
For artists this basically means if you increase the roughness in your material then you increase the mip map level of the environment probe it samples light from and it gets blurier.
<img src="https://i.imgur.com/KkPSWrc.png" width="384"> <img src="https://i.imgur.com/8vEJCDR.png" width="384">
### Fallback for Missing Data
<img src="https://i.imgur.com/67k9QXG.png" width="384"> <img src="https://i.imgur.com/gfBG0Gm.png" width="384">
If you haven't downloaded the additional baked light data from the [RBDOOM-3-BFG ModDB Page](https://www.moddb.com/mods/rbdoom-3-bfg) and just run RBDOOM-3-BFG.exe with the required DLLs (or you built it yourself) it will use an internal fallback.
RBDOOM-3-BFG.exe has one prebaked environment probe that is compiled into the executable.
Left: No extra ambient pass. Ambient is pure black like in original Doom 3. Right: Extra ambient pass with r_forceAmbient 0.2 using local environment probe for irradiance and radiance lighting.
<img src="https://i.imgur.com/KldEkrI.jpg" width="384"> <img src="https://i.imgur.com/tM0aEIV.png" width="384">
It's the light data from the Mars City 1 lobby in the screenshot above. Using this data for the entire game is inacurrate but a better compromise than using a fixed global light direction and some sort of Rim lighting hack like in version 1.2.0.
The default irradiance / radiance data gives the entire game a warmer look and it fits for being on Mars all the time.
### Some Examples of Indirect Lighting
<img src="https://i.imgur.com/KkPSWrc.png" width="384"> <img src="https://i.imgur.com/OSxFcAf.png" width="384">
<img src="https://i.imgur.com/67k9QXG.png" width="384"> <img src="https://media.moddb.com/images/mods/1/50/49231/rbdoom-3-bfg-20210409-221842-001.png" width="384">
Left: No extra ambient pass. Ambient is pure black like in original Doom 3. Right: Extra ambient pass with r_forceAmbient 0.5 using local environment probe for irradiance and radiance lighting.
<img src="https://i.imgur.com/ZEI4i87.png" width="384"> <img src="https://i.imgur.com/FC82oOM.png" width="384">
@ -57,8 +126,12 @@ Some examples that show additional environment lighting on all assets.
<img src="https://i.imgur.com/5Pcomzu.png" width="384"> <img src="https://i.imgur.com/IczOpHI.png" width="384">
<img src="https://i.imgur.com/xBPa2Y8.png" width="384"> <img src="https://i.imgur.com/MCjwFE7.png" width="384">
## PBR Texture format
<img src="https://i.imgur.com/Y9CFBaM.png" width="640">
In Doom 3 a classic simple materials looks like this:
```
textures/base_wall/snpanel2rust
@ -94,7 +167,7 @@ models/mapobjects/materialorb/orb
}
```
The engine will also look for _rmao.[png/tga] overrides for old materials and if it finds them it will render using a better PBR path. Oldschool specularmaps also go through a GGX pipeline but the roughness is estimated from the glossmap.
The engine will also look for _rmao.[png/tga] overrides for old materials and if it finds those it will render them using a better PBR path. Old school specularmaps also go through a GGX pipeline but the roughness is estimated from the glossmap.
The Ambient Occlusion will be mixed with the Screen Space Ambient Occlusion and will only affect indirect lighting contributed by the environment probes.
@ -110,23 +183,60 @@ The first top band is the original signal. The second shows just 8 blocks and if
<img src="https://i.imgur.com/QJv2wH2.png" width="384"> <img src="https://i.imgur.com/MaXqld4.png" width="384">
## TrenchBroom
This release also adds experimental support for TrenchBroom. The goal of the TrenchBroom support is to make it easier to create new maps. It doesn't allow to create bezier patches so you won't be able to edit existing Doom 3 maps.
However you can copy paste brushes and entities into your new map using the Doom 3 (Valve) configuration.
TODO
## Changelog
## TrenchBroom Mapping Support
<img src="https://i.imgur.com/tIj6wpd.jpg" width="640">
***This is still very much Work in Progress and not supported by the official TrenchBroom.***
Mapping for Doom 3 using TrenchBroom requires an extended unofficial build that is bundled with the official RBDOOM-3-BFG 7z package.
You can find the customized version under tools/trenchbroom/.
Doom 3 also requires some extensions in order to work with TrenchBroom. I usually develop these things for RBDOOM-3-BFG but I created a seperated brach for vanilla Doom 3 so everybody can adopt TrenchBroom and the new Doom 3 (Valve) .map support.
https://github.com/RobertBeckebans/DOOM-3/tree/506-TrenchBroom-interop
The goal of the TrenchBroom support is to make it easier to create new maps. It doesn't allow to create bezier patches at the moment so you won't be able to edit existing Doom 3 maps.
You can only save maps to the Doom 3 Valve format but you can copy paste from the vanilla Doom 3 .map format into the Doom 3 (Valve)configuration and reset your texture alignment as you want.
TrenchBroom doesn't support brush primitives like in D3Radiant or DarkRadiant and if you are familiar with TrenchBroom then you know that the preferred .map format is some kind of (Valve) .map format for your game.
The Quake 1/2/3 communities already adopted the Valve .map format in the BSP compilers and I did the same with dmap in RBDOOM-3-BFG.
Here is an overview of the changes made to TrenchBroom:
***New***
* Doom 3 .map parser with brushDef3, patchDef2, patchDef3 primitives
* Doom 3 Valve .map configuration
* Quake 3 .shader parser adopted to support .mtr
* .mtr support includes support for Doom 3 diffuse stages and the lookup for them is like in idMaterial::GetEditorImage()
* New Doom 3 OBJ parser. My TB Interop branch automatically creates OBJ files to work with TB and it also allows seamless interop with Blender 2.8x and 2.9x with the need of additional model formats for func_static entities (like misc_model for Quake 3)
* Game FGDs for Doom 3 and Doom 3 BFG
***Issues***
* D3Radiant usually does not allow to use just textures. Only valid materials work and only materials should be shown in the texture collection overview. However this branch still displays all found textures.
* It has no support for BFG .resource files and .bimage files. BFG only shipped for precompressed textures and no .tga files so people who want to mod for BFG have to copy the vanilla D3 base/textures/* and base/models/* to D3BFG/base/
* Many entities work differently in Doom 3 if they have an origin. Brush work in D3 is usually stored in entity space and not world space. This is a major issue and not solved. I couldn't figure out how to parse the origin first and then translate the brushes accordingly.
* Doom 3's primary model formats are LWO and ASE. LWO and .md5mesh model support is missing.
* Some ASE models can't be loaded and materials are usually all wrong if loaded
### Some Scenes of Mars City 1 loaded into TrenchBroom
<img src="https://i.imgur.com/nqR04z8.jpg" width="384"> <img src="https://i.imgur.com/GxL1X02.jpg" width="384">
## General Changelog
[PBR]
* r_useHDR 1 is now the default mode and can't be turned off because it is a requirement for Physically Based Rendering
* Changed light interaction shaders to use PBR GGX Cook-Torrance specular contribution. The material roughness is estimated by the old school Doom 3 glossmap if no PBR texture is provided
* PBR texture support ground work is done. Only a few bits are left to be enabled.
* PBR texture support
* Extended ambient pass to support Image Based Lighting using a single fixed cubemap at the moment (r_usePBR)
* Extended ambient pass to support Light Grids and Environment Probes
* Turned off Half-Lambert lighting hack in favor of Image Based Lighting
@ -134,9 +244,9 @@ TODO
* Turned off r_hdrAutomaticExposure by default because it caused too much flickering and needs further work. The new default values work well with all Doom 3 content
* r_lightScale (default 3) can be changed when HDR is enabled
* r_lightScale (default 3) can be changed
* Light shaders were tweaked with magic constants that r_useHDR 1, r_forceAmbient 0.3, r_exposure 0.5 look as bright as in Doom 2016 or any other PBR renderer
* Light shaders were tweaked with magic constants that r_forceAmbient 0.5, r_exposure 0.5 look as bright as in Doom 2016 or any other PBR renderer
* SSAO only affects the ambient pass and not the direct lighting and the ambient occlusion affects the specular indirect contribution depending on the roughness of a material. See moving Frostbite to PBR (Lagarde2014)
@ -148,8 +258,16 @@ TODO
* Fixed ellipse bug when using Grabber gun in HDR mode #407
* Added LoadEXR using tinyexr, LoadHDR using stb_image
* Added Spherical Harmonics math from Probulator by Yuri O'Donnell
* Added Octahedron math by Morgan McGuire - http://jcgt.org/published/0003/02/01/
[VULKAN]
* **NOTE THE VULKAN BACKEND IS STILL NOT FINISHED!!!**
* Fixed GPU Skinning with Vulkan
* Fixed the lighting with stencil shadows with Vulkan and added Carmarck's Rerverse optimization
@ -173,6 +291,8 @@ Using the models argument will also export all needed models by entity declarati
* To make it easier getting static models from Blender/Maya/3D Studio Max into TrenchBroom and the engine Wavefront OBJ model support has been ported from IcedTech
* Support ***angles*** keyword again for TrenchBroom like in Quake 3
[MISCELLANEOUS]
* com_showFPS bigger than 1 uses ImGui to show more detailed renderer stats like the original console prints with r_speeds
@ -203,6 +323,18 @@ Using the models argument will also export all needed models by entity declarati
* Windows builds still require OpenGL 4.5 but they run in compatibility profile instead of core profile
* Support for the MIPS64 architecture (thanks to Ramil Sattarov)
* Initial support for the PPC64 architecture (thanks to Trung Lê)
* Initial support for the Rasperi PI4 (thanks to Alejandro Piñeiro)
* Updated Mac OS support (thanks to Steve Saunders)
* Improved console layout (thanks to Justin Marshall)
* Added invertGreen( normalmap.png ) material keyword to allow flipping the Y-Axis for tangent space normal maps
_______________________________________

View file

@ -385,7 +385,7 @@ void main( PS_IN fragment, out PS_OUT result )
// evaluate specular IBL
// should be 8 = numMips - 1, 256^2 = 9 mips
const float MAX_REFLECTION_LOD = 10.0;
const float MAX_REFLECTION_LOD = 8.0;
float mip = clamp( ( roughness * MAX_REFLECTION_LOD ), 0.0, MAX_REFLECTION_LOD );
//float mip = 0.0;

View file

@ -266,7 +266,7 @@ void main( PS_IN fragment, out PS_OUT result )
// evaluate specular IBL
// should be 8 = numMips - 1, 256^2 = 9 mips
const float MAX_REFLECTION_LOD = 10.0;
const float MAX_REFLECTION_LOD = 8.0;
float mip = clamp( ( roughness * MAX_REFLECTION_LOD ), 0.0, MAX_REFLECTION_LOD );
//float mip = 0.0;

View file

@ -5033,7 +5033,7 @@ static const cgShaderDef_t cg_renderprogs[] =
" // evaluate specular IBL\n"
"\n"
" // should be 8 = numMips - 1, 256^2 = 9 mips\n"
" const float MAX_REFLECTION_LOD = 10.0;\n"
" const float MAX_REFLECTION_LOD = 8.0;\n"
" float mip = clamp( ( roughness * MAX_REFLECTION_LOD ), 0.0, MAX_REFLECTION_LOD );\n"
" //float mip = 0.0;\n"
"\n"
@ -5672,7 +5672,7 @@ static const cgShaderDef_t cg_renderprogs[] =
" // evaluate specular IBL\n"
"\n"
" // should be 8 = numMips - 1, 256^2 = 9 mips\n"
" const float MAX_REFLECTION_LOD = 10.0;\n"
" const float MAX_REFLECTION_LOD = 8.0;\n"
" float mip = clamp( ( roughness * MAX_REFLECTION_LOD ), 0.0, MAX_REFLECTION_LOD );\n"
" //float mip = 0.0;\n"
"\n"