Virtual Darkness: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
No edit summary
m (make the important things bold)
Line 26: Line 26:
==Enabling Virtual Ambient Light==
==Enabling Virtual Ambient Light==


All that mappers need to do to allow players to select virtual ambient light is to name their main ambient light "ambient_world". That's it. If the player selects this feature then Dark Mod takes the color/brightness values of that light and passes it to all the textures then switches off that ambient light. It is therefore important for mappers to do this to provide the best performance for players with slower machines.
All that mappers need to do to allow players to select virtual ambient light is to name their main ambient light '''"ambient_world"'''. That's it. If the player selects this feature then Dark Mod takes the color/brightness values of that light and passes it to all the textures then switches off that ambient light. It is therefore important for mappers to do this to provide the best performance for players with slower machines.


Note: Some special materials have a background texture plus detail that is only visible with a real ambient light, for example, darkmod/stone/sculpted/corpse. The mapper can place normal lights or local ambient light for those surfaces where possible or leave them with their background texture.
Note: Some special materials have a background texture plus detail that is only visible with a real ambient light, for example, darkmod/stone/sculpted/corpse. The mapper can place normal lights or local ambient light for those surfaces where possible or leave them with their background texture.




{{lighting}}
{{tutorial-lighting}}
[[Category:Tutorial]]

Revision as of 13:08, 30 November 2008

written by Fidcal

Introduction

Being a stealth game system and as its name implies, most Dark Mod missions will take place at night and require darkness as cover. Generally, absolute blackness is unpopular in this type of game and is not recommended. It can make navigation difficult, uncomfortable, and gives an impoverished visual display. Instead, very low ambient light is used to represent blackness. We call this virtual darkness. This main ambient light should not be so dark that the player cannot make out some detail of nearby surfaces textures. Yet because it represents complete darkness It should not be so light that it seems strange that in-game characters cannot see you (see later.)

Ambient light can be coloured to provide atmosphere and realism depending on the environment.


Ambient Light

The main ambient light does illuminate the player but if kept to the recommended low level this is a negligible amount in which AI characters cannot see the player and thus represents complete darkness without blinding the player.

Unlike normal lights, ambient light does not by default fade to the edge of its radius but is the same constant brightness throughout. Rich variation of fading or patterning can be introduced with a light texture. For general use, ambientLightnfo is recommended as it has no patterning and so its brightness is consistent throughout its volume. Regard it as the one to use by default.

Other local ambient lights can be used to produce highlights, mood, or any purpose the mapper can imagine so can be any brightness.


Virtual Ambient Light

All lights in Dark Mod are dynamic, real-time, having the potential to vary in-game and cast shadows. Naturally this affects performance and having too many lights close together is likely to reduce frame rates so care must be taken. This applies to the main ambient light too which naturally covers all surfaces.

To improve performance on some low-end systems, Dark Mod textures can simulate the main ambient light. This feature pre-calculates how much textures should be illuminated once only instead of continuously during gameplay. Players can select either method so those with faster machines can use the true ambient light which gives better quality.


Enabling Virtual Ambient Light

All that mappers need to do to allow players to select virtual ambient light is to name their main ambient light "ambient_world". That's it. If the player selects this feature then Dark Mod takes the color/brightness values of that light and passes it to all the textures then switches off that ambient light. It is therefore important for mappers to do this to provide the best performance for players with slower machines.

Note: Some special materials have a background texture plus detail that is only visible with a real ambient light, for example, darkmod/stone/sculpted/corpse. The mapper can place normal lights or local ambient light for those surfaces where possible or leave them with their background texture.