D2X-XL Worklog

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

Mesh Optimization

Had you ever noticed that certain areas in Descent 2 levels were very dark despite some light source being close? The reason behind that is a peculiarity of the light calculation system employed in D2X-XL (and as I write this, of every other Descent 1 and Descent 2 version): Color values are assigned to each vertex (corner) of the faces composing a level, and the light colors of the face's pixels are interpolated (derived) from these vertex colors. For huge faces that means that even though the light source may be close to the face's surface, it may be quite far away from its vertices. As light decays with the distance, that means that the vertices (correctly) are quite darker than the light source. This however breaks the lighting for the face's center: Its color is derived from the (dark) vertex colors, so it will be pretty dark, too.

There's two cures for this: True per pixel light calculation using shader programs - this requires quite a few changes in the D2X-XL renderer - or splitting huge faces into smaller ones, increasing the number of vertices and thus always having some vertex close enough to any light source in the level. While per pixel lighting certainly is an option , I decided to go for a mesh optimizer first. It took me a few days to get it done, but the result is pretty pleasing. The only backdraw to this method is that the more vertices you add to a level, the more work the lighting code has to perform, so depending on computer speed, level size and mesh quality you can really bring the renderer down to a crawl.

This is particularly true with many light sources around, which brings me to another optimization. Currently, each shot fired by a gun is a separate light source. For shots fired in groups, like plasma blobs or laser bolts, this doesn't make much sense lighting wise as they are really close together. D2X-XL will therefore treat each group of related shots as a single light source with appropriate brightness. For quad lasers this will cut the number of light sources down to a quarter.

Pictures are always good, so here are some picture from a test level with very huge faces (80x80) I have built, showing the mesh at the various improvement stages. The orange lines surround the original rectangular faces.

Various mesh grids

Lights at low, medium and high mesh qualities

Gun shot at medium and high mesh qualities

Now for the options . I am currently working on per pixel lighting and I believe I have taken the biggest hurdles. Performance looks acceptable, and while there's still some work to be done, D2X-XL might offer true per pixel lighting in the near future. Now does that sound like an incentive for a donation?


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.