Lighting A to Z: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Line 22: Line 22:
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.
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).
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).
Line 30: Line 29:


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.
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.
=== Parallex ===
needs defined - something about pointing one direction, like a spotlight.


=== Specular ===
=== Specular ===
I assume this skips a lighting pass on any specular maps on all objects and terrain. Metal has alot of spec. Oldwood is low spec.


=== Diffuse ===
=== Diffuse ===
This would probably toggle lighting the diffuse map, so maybe you can get some shine from metal (specular) but not light the tex at all, could make cool glimmer effects.
=== Shadows ===
=== Shadows ===
Do not cast shadow:
This turns off any shadow casting. Lights and objects have this option. Boosts performance. Good for ambient fill lights.
=== 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.


== Performance ==
== Performance ==

Revision as of 18:00, 31 October 2009

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.

Tip: you can rotate a light so only one corner will touch a wall and make a triangluar shaped light. Or rotate it so 2 corners touch a wall and make a line of light.

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.


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.

Parallex

needs defined - something about pointing one direction, like a spotlight.

Specular

I assume this skips a lighting pass on any specular maps on all objects and terrain. Metal has alot of spec. Oldwood is low spec.

Diffuse

This would probably toggle lighting the diffuse map, so maybe you can get some shine from metal (specular) but not light the tex at all, could make cool glimmer effects.

Shadows

Do not cast shadow: This turns off any shadow casting. Lights and objects have this option. Boosts performance. Good for ambient fill lights.

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.

Performance