D2X-XL Worklog

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

Per Pixel Lighting

After weeks of coding and testing it has finally arrived: True per pixel lighting for Descent 2!

When you first start to play a level with per pixel lighting turned on, you may wonder what all the fuzz is about. Per pixel lighting does not look spectacularly different or better than per vertex lighting (it may do so in the future, should I add bump and parallax mapping). What per pixel lighting does is to produce lighting that very well corresponds to the position of brightness of light sources. That means that gun shots will produce nice round glows on all surfaces affected, and static lights will similarly produce a sphere of light around them that decays with growing distance from the light source. Lighting will be just way more precise than with per vertex lighting.

There have been a lot of pitfalls and things to work around to make per pixel lighting work with Descent. One problem are the lights that simply consist of a texture glued on a face. There is no way to have each lamp on a face emit light separately, and simply placing the light source in the face's center doesn't work either, as the face's periphery in most cases would be way too dark. So I had to find a way to light entire light texture bearing faces and still make it look plausible.

Another problem is the excessive amount of light sources in many Descent levels. The lighting you see in standard Descent mines does not physically correspond to the number and brightness of light sources present. Add the huge number of lights an intense fire fight can produce on top of that, and you start to have a problem. I have found that in some cases over 30 light sources per face need to be processed to avoid lighting flaws. You can blame this for all cases of excessive saturation.

To obtain as much speed as possible despite of all these problems, I have done a lot of tests and optimizations, built shader programs that could process variable numbers of lights, created algorithms to sort faces so that the number of texture and shader program switches are minimized, devised methods to reduce the number of light sources produced by gun fire, reduced the number of lights processed per face ...

One thing helping both speed and visual quality very much are lightmaps which work perfectly together with dynamic per pixel lighting. I have covered lightmaps in another worklog article already.

While I am finding the result of my effort visually very pleasing, you will have to live with a hefty performance penalty when using per pixel lighting. There may be light rendering methods better suited to the excessive amount of light sources present in Descent, but I had to get into regular shader based per pixel lighting first, and these methods require some pretty advanced hardware (well, my current implementation does that, too, but for different reasons). I found per pixel lighting to run acceptably well on machines equipped with Athlon 64 3500+ CPUs and Radeon X850 XT and X1900 XT graphics cards, but you probably won't get very happy with it with anything weaker than that.

If there are few variable lights around, lightmaps will help to speed the rendering up very much as they are precomputed and simply need to be blended with the geometry. If you follow the advice from my worklog entry "Speed And Light" (where you will also find details regarding per pixel lighting settings) and have a sufficiently powerful hardware, per pixel lighting should work acceptably well for you.

So far so good. Enough of the talking. You can now play around with it and see for yourself.


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.