D2X-XL Worklog
Notes on features and problems from the development of D2X-XL, newest first.
Light And Shadow |
|
This is a pretty ambiguous title, and actually this worklog entry is not about what you may be expecting now. What it is about is the required precalculations for OpenGL style lighting and shadow rendering. Depending on level size and complexity these can take quite a while, making you sit in front of your computer, staring at the level loading progress bar, and wondering whether your machine is still alive and doing something, or has quietly died a graceless death due to some infamous bug in D2X-XL. I hated this too, so I had to find a cure: Once computed, the data can be stored on harddisk and retrieved the next time the level is loaded while OpenGL style lighting and/or shadow rendering are enabled. To enable this feature, all you need to do is to set '-cache_lights 1' in d2x.ini and create a subfolder named 'temp' (Linux: <home>.d2x-xl/temp) in your D2X-XL main folder - that is where D2X-XL will store and look for the precomputed data. The data filenames are composed of the hog file name, the level number and the extension '.pre'. Hence the light data file for the first mission of Descent 2:Counterstrike would be named 'descent2-1.pre'. If a level has significantly changed since D2X-XL has computed its lighting data, D2X-XL will notice it and recompute the data. To speed the entire process up a little more, D2X-XL can employ multi-threading for it. This will however bog a dual-core machine almost totally down - D2X-XL really manages to keep both cores extremely busy. Enable with '-multithreaded 1' in d2x.ini. For your convenience, my level sets Warp Shockwave, Boiling Point and Lunar Outpost Reloaded come with precomputed light data now. |



