How to properly light a level

Everything around the Descent level editor

Moderators: Frustikus, Aus-RED-5

User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

How to properly light a level

Postby karx11erx » Tue Mar 27, 2012 7:27 am

I had written about this topic already; long time ago though. Since I have seen quite a few maps that have been less than perfect in this area, and since this lack of perfection seems to mostly stem from a lack of understanding of DLE-XP's capabilities, I will give a brief explanation of what it offers here.

With DMB and DEVIL, there are three ways to light an area of a level:

1) put a distinct light texture there
2) edit the vertex light values
3) put the "empty - light" texture there (a variant of 1) you could apply when you wanted light w/o a visible light source)

Problems with these methods.

2) Has the disadvantage that you need to exclude such areas from automatic illuminiation or the values will be overwritten
3) Has the disadvantage that you are only having a single, strong brightness value

DLE-XP offers a better, and fully compatible way of lighting level areas you cannot easily, or do not want to light using light textures. To understand that it is indeed compatible, you need to know how Descent's regular lighting (which is dubbed "basic lighting" in D2X-XL) works: DLE-XP (and DMB2) walk through the mine and take a look at every face (segment side) whether it bears a light emitting texture (an actual light, the "empty - light" texture, or another light emitter like e.g. lava, certain signs, etc.) If it does, the brightness value of that texture is looked up in a table and the program starts to illuminate all segments around that face by computing the brightness values of each of their faces' vertices. The brightness decreases depending on a vertices distance from the light emitting face, and also depending on its orientation (angle towards the face). The vertex brightness values are stored in a separate table file of the level, and it is only these vertex brightness values that are subsequently used by Descent (or Rebirth, or XL's standard lighting) to render a mine.

The point about this method is that a brightness lookup table is used. This table is hard coded in DMB2, but you can change it in DLE-XP. This means that you can change the brightness values of existing lights (to the extent of them not emitting light anymore) as well as the brightness values of non-light emitters. DLE-XP will use these modified values to compute vertex brightness values just as explained above. This is totally transparent to every Descent 1 + 2 program version and will work for each of them. The table file itself (<level file name>.lgt) is simply ignored by all Descent versions except D2X-XL (which uses it for all lighting methods except "basic").

DLE-XP also allows to assign a light color to a light emitting texture (which in the case of DLE-XP is every texture you have given a brightness value > 0). These color values are stored in another table in the mission file (<level file name>.clr) and are only used by D2X-XL; all other Descent versions again ignore it.

The only other thing you need to know is that you can assign brightness and color values on a per face or per texture base. Per face means that the brightness and color you assign to a texture only are effective for the currently selected segment side. This allows you to create totally individually placed and parameterized light sources in the level. Per texture means that every face in the level bearing the currently selected texture will have the brightness and color you have assigned to that texture. You can switch between these two modes in the preferences tab via teh "use texture colors" check box in the lighting box. If you check it, brightness and color settings are per texture, otherwise per face.

Another big advantage of this method of lighting a level is that it is compatible with all lighting methods of D2X-XL - manually editing vertex brightness values is not!

The last function of DLE-XP you need to know about in this area is that you can always reset your custom brightness and light values to the standard values using the "reset color and brightness values" button in DLE-XP's light tool.
User avatar
Hawkins
Posts: 256
Joined: Wed Jan 11, 2012 1:18 pm
Location: /Universe/Milky-way/Sol/Earth/Europe/Greece/Athens/~

Re: How to properly light a level

Postby Hawkins » Tue Mar 27, 2012 1:59 pm

karx11erx wrote:[...] The table file itself (<level file name>.lgt) is simply ignored by all Descent versions except D2X-XL (which uses it for all lighting methods except "basic"). [...] Another big advantage of this method of lighting a level is that it is compatible with all lighting methods of D2X-XL - manually editing vertex brightness values is not! [...]

Considering the *.lgt is ignored by all non-XL ports/versions, wouldn't it make more sense to be automatically generated when mission saved and updated on the go (editing), just like with the *.clr file? The reason I am saying this is to facilitate manual vertex lighting to the *.lgt data, so that XL levels can enjoy custom light art, so to speak. The *.lgt upon the first time is mission saved is generated with whatever vertex values are on the level (usually the trivial same ones, that come before ever messing with it). Any changes you make to lighting either via the lighting tool, or manually editing vertex values, are overwritten in the *.lgt.

After all it's XL hurting from that, and it's only one step away to make lighting processing in DLE-XP XL-consistent (to incorporate manual lighting in the process and be complete in that regard). What do you think?
Gigabyte® GA-X48-DQ6
Intel® Core 2™ Quad Q6600 @2.4GHz
ATi(AMD®) Radeon™ HD4870
________________________________________________________________________
Descent Rangers
Captain of Black Lions squadron
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: How to properly light a level

Postby karx11erx » Tue Mar 27, 2012 5:32 pm

What?

Your post is rather hard to understand. I am having problems with the grammar.
User avatar
Hawkins
Posts: 256
Joined: Wed Jan 11, 2012 1:18 pm
Location: /Universe/Milky-way/Sol/Earth/Europe/Greece/Athens/~

Re: How to properly light a level

Postby Hawkins » Tue Mar 27, 2012 5:54 pm

You said that any light editing done via the light tools of DLE, is stored and updated in an .lgt file within the .hog. And that manual vertex lighting does not (changing vertex lighting manually, vertex by vertex) What I am saying is to include such changes (manual vertex light changes) to the .lgt, so that those changes are also seen by XL's higher quality lighting settings. That's just it...
Gigabyte® GA-X48-DQ6
Intel® Core 2™ Quad Q6600 @2.4GHz
ATi(AMD®) Radeon™ HD4870
________________________________________________________________________
Descent Rangers
Captain of Black Lions squadron

Return to “DLE-XP Help”

Who is online

Users browsing this forum: No registered users and 1 guest