D2X-XL Worklog

Notes on features and problems from the development of D2X-XL, newest first.

Transparency

Transparency handling was none of an issue in the original Descent, but the more effects I added to D2X-XL, the more visual flaws appeared when displaying transparent objects, most noteably black areas around them hiding everything behind them. The reason for this is the way currenty graphics hardware handles texel rendering (I am using the term 'texel' to denote that it is located in 3D space. Pixels are located in the 2D space of the screen). Each texel has a depth coordinate (the Z value) roughly spoken giving its distance from the viewer: The further away, the bigger. Now if a texel gets rendered, a depth buffer is checked whether there is already a pixel occupying the 2D location the texel gets projected on. If so, that pixel's depth entry is compared to the texel's depth value, and if it is bigger, it gets overwritten (this is called overdraw).

Now overdraw is not desireable as it costs performance, so the polygons that are to be rendered during a frame are sorted by their distance from the viewer and the closest, that appear biggest due to perspective are rendered first, occupying a big part of the screen very quickly and thus preventing more distant polygons' pixels from being written to the graphics hardware's color buffer. This does not work well for semi-transparent polygons, as there is no way to store transparency information in the render buffer. It's either 'there is no pixel, or there is one and it is closer, or at the same distance, or further away'. That means you need to make sure that stuff behind transparent objects is rendered first. D2X-XL does this in two passes: The first pass renders opaque stuff front to back, the second renders transparent objects back to front, using depth information retrieved via the level's segment structure for sorting.

No big deal, you may think, but the problems start already with transparent objects in one segment, as the Descent engine has no way of taking that into regard. It gets worse if you have a lot of transparent objects (like smoke particles) that have no information about what segment they are in because that would slow the renderer down too much. Having the smoke renderer do some sorting as explained in another worklog entry helps, but only unless there are a lot of other transparent objects the smoke renderer doesn't know of (gun fire or lightning effects). The problem also became very apparent if you had semi-transparent geometry (like a mesh glass window) and smoke behind it: The smoke simply wasn't visible.

Well, there may not be a cure for everything, but for this there is. I simply expanded the smoke renderer's depth buffer scheme into a general depth buffer for transparent objects. It turned out that it was pretty simply to have the renderer first feed the depth buffer with all (well, most) transparent objects, and then render them. Having all objects rendered by a central renderer even allowed some optimizations. To bring the long story to an end: D2X-XL now does full depth sorting of transparent objects at no loss of performance (apart from that caused by having to render more stuff than before because it's now visible ).

Sounds good?


News

A new D2X-XL update fixing broken screen resolution persistence is available

There is yet another D2X-XL update is available (the new Pumo Mines broke a few things ...)

Believe it or not: There's a new D2X-XL version online!

Uploaded updated D2X-XL and library source code that compiles with Visual Studio 19

After a really long time, another new DLE version is available

A new DLE version is available (hear, hear!) :D

A new Max OS X version of D2X-XL is available!

D2X-XL now offers a cartoon style render mode!

New D2X-XL and DLE versions are available

Blarget has got his own area in the level spotlight

New D2X-XL and DLE versions are available

A couple of levels have been added to the level spotlight

Hooray! We're finally having a new Mac OS X version of D2X-XL!

D2X-XL now features an observer mode for multiplayer games

A new D2X-XL version with improved multiplayer synchronization is available

A new D2X-XL version fixing out of sync problems in multiplayer games is available

A new D2X-XL version with many multiplayer bug fixes is available

Added high quality (ogg) Descent 1 and 2 music to the downloads area

A new D2X-XL version with important bug fixes is available

D2X-XL compiles and runs on Linux again!

Descent 1 and 2 high res textures are now available as complete downloads

A new DLE version with a ton of bug fixes and improvements is online

A new D2X-XL version is online

A new D2X-XL version with a much needed bug fix is online

A new DLE version is online

Published another DLE version with more bug fixes and improvements by Sirius

Published a new D2X-XL version

Published a new DLE version with tons of bug fixes and improvements by Sirius

D2X-XL now supports Oculus Rift 3D headsets!

Updated DLE and D2X-XL to support new level features requested by Pumo

Added an article about DLE's new tunnel generator to the worklog

DLE's new tunnel generator is finished

Added a new article to the worklog

Published a new DLE version

Added a new article to the worklog

Added two new articles to the worklog

D2X-XL and DLE-XP now support triangular segment sides!

DLE-XP has an OpenGL render and 1st person view!

New DLE-XP version available

Wrote a new worklog article

Check out DarkFlameWolf's level spotlight section!

New DLE-XP and D2X-XL versions are available

A new DLE-XP version is available

Added a worklog article about the way point feature

Added way point support to DLE-XP and D2X-XL

Posted a bunch of new screenshots

Posted a bunch of new screenshots

A New version of DLE-XP is available

New OS X version of D2X-XL is available!

Added article about lightmaps to worklog.

New article and video added to worklog.