Download

D2X-XL Worklog

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

Better Lighting

When I examined level 4 'Subzero' of my mission Boiling Point recently after having adjusted a few lights there, I made a shocking discovery: A room that should have been tinted in deep red and black had a large white area at one of its sides. I started to look for any invisible white light sources in that room, but couldn't find any. Finally it dawned on me that a nearby, but completely unconnected room with a lot of white lights had been influencing the lighting here. So my slow, clumsy, super precise light data precalculation hadn't been so precise at all. Gah.

I had to find a way to have light sources only light areas they could 'see'. I pondered on this a while until an insight struck me like a flash of genious: why not simply use the renderer's visibility culling function for this? I added the required code, and it works, it is simple, it is fast, and it is precise. What else would I want?

So if you load a level for the first time after this change, loading it might take a little longer, but it is worth the wait.

Da room (neat, huh?):

Here you can see the faulty lighting: