Lighting A to Z

From The DarkMod Wiki
Revision as of 17:52, 31 October 2009 by Baddcog (talk | contribs) (→‎Theory)
Jump to navigationJump to search

Lighting A to Z : Baddcog

This will cover all things to do with lighting in Dark Radiant.

Theory

Ramble on about shadows, light and gameplay...

Creating a light

Simply right-clicking in any 2d view will create a light entity in your map. This will create a default white light of 100 brightness, most likely you will want to change the radius of the light and other properties such as color.


Radius

The 'radius' of your light can be changed by dragging it's corners around in the 2d windows. Doom 3 lights do not have an actual radius, they are actually square lights and will light up everything they touch inside their bounding box in the editor. They will evenly light everything to their edges. While square lights might seem fairly odd there are options to make them more believeable and have a nice fade, namely the 'texture' applied.

Light options

To change a lights options select it and press 'L'. This will open up the lights dialog and give you the following options:

Color & Brightness

Using the color wheel you can select the color of light you want and also the brightness. Lights tend to be very bright if you saty in the brighter colors, dragging the dot towards the black side of the spectrum will dim them.

If you choose pure black you will not have a black light, but instead a lack of light. Pure white will be white and very bright. Medium grey will be white, just less bright than pure white. You can also use the rgb number bars to add exact colors/brightness.

Texture

The texture selection can add some great effects while keeping performance good. Torch entities have an animated 'pulsing' texture applied already. This gives the illusion that light flames are flickering, but it won't cast expensive flickering shadows. It can also be used to give a nice round fade the the stock square lights. It can also be used to cast a window texture across a floor to make it look like moonlight is pouring through the window.

Having the texture selected and displayed in the window means it is applied. To remove it close the folders so you have no texture applied (This may be tricky).

One issue I have found so far is that any objects (tables, chairs, etc..) and patches will be 'full bright' if they fall within the lights bounding box. While this looks good on a fully lit electric chandelier it doesn't look good on a dining room table.

A workaround is to use 2 lights. One with the texture you want, carefully placed to not hit any major objects in the scene, with shadows turned off. And a second light with no texture to light the room, objects and cast shadows.

Specular

Diffuse

Shadows

Performance