Lighting Basics

From Mod Wiki

Jump to: navigation, search

Contents

Description

Lights are essentially a projection of a texture. A standard light entity - which can be represented as a bounding box and a light source point - is just a projection of the texture through the top and bottom of a bounding box, with the brightness of the projection affected by the position of the light source point. Light and shadows are cast in the direction of the light source point to the bounding box's centre.

Example behaviour

Light behaviour is best understood through experimentation within editWorld. The live renderer mode (activated by pressing F3) means that lights can be tweaked with immediate results.

The screenshots below show the same light but with a different light texture in each: a simple 'round' texture, a grid and a grate. Note how the edge of the texture is projected along the walls.

A light with a standard 'round' texture
A light with a gridded texture
A light with a grate texture

Light types

There are four types of light entities that can be placed inside your map:

light

Light entities act just like the normal lights from Doom 3, they are not affected by portals.

light_interior

light_interior entities are a bit different to light entities as they only flood inside the area they sit in. To have a light flood into another area (i.e. through a visportal) you will need to place a light_vis_dummy in the area you want the light to flood into, and have the light_interior entity target the light_vis_dummy.

  • Note: The light floods from its "center", not it's "origin"

light_inside

Light_insides are just like a normal light entity, in the way that it will flood to all areas, except where an outside portal is used.

light_ambient

Light_ambients are used to give areas that are defined by ambient portals a consistant light to fake an ambient inside an area, which you would compliment with other light/light_interiors/light_inside entities.

See also

Template:Seealso light

Personal tools