Torque/LightingSystem/Lighting Models

From TDN

Introduction

The Torque Lighting System provides several built in lighting models to choose from, each with its own strengths and applications.

Contents


Lighting Models

Lighting models create an engine's distinctive look, feel, and style. To offer the most flexibility the Torque Lighting System offers six built-in lighting models, as well as the ability to create your own. Getting a feel for the lighting models makes it easier to achieve a specific look in your game.

The following discusses the lighting models and explains how they interact with the light's color, intensity, and radius values.

Original Stock

Introduced in the original Lighting Pack, this is the default Lighting Model. This model is unique in that it has no maximum intensity - the light's color and intensity attenuate its intensity, however they do not create a ceiling (normally the color and intensity act as an upper limit) - this makes the model easy to overexpose. The radius represents the distance at which the intensity starts to fall off.

The Stock model is extremely useful when trying to bring a lot of light into a limited space, using spotlights, or any application where intense lighting is needed to highlight objects and create focal points in the scene. Most models fill a scene with light, but the Stock model is designed to put lighting into focused areas.

Original Advanced

Introduced in the original Lighting Pack, it was the first alternative lighting model and provides radiosity like lighting (very smooth and gradual). The color and intensity represent the maximum value the light can ever achieve. The radius represents the outer edge of the light's influence.

The Advanced model is useful for flooding large areas with light.

Inverse Square

Introduced in Lighting Pack version 1.3.5, this model is meant as an alternative to the Advanced model. The color and intensity represent the maximum value the light can ever achieve. The radius represents the distance at which the intensity falls to half, and the lighting continues to drop off gradually for a considerable distance.

The Inverse Square model was introduced as an alternative to the Advanced model that provides falloff characteristics that blend more smoothly into existing lighting. Generally speaking the Inverse Square model is better suited for use in scenes with complex lighting, whereas the Advanced model provides a better single light solution.

Inverse Square Fast Falloff

Same as the Inverse Square model except the lighting intensity falls off to practically nothing at the radius.

Near Linear

Same as the Inverse Square model except the falloff is linear.

Frankly this is the least flexible model, although it works well in multi-light scenes the lighting isn't very believable. Linear lighting does work well in conjunction with a high local ambient value works very well for creating a background lighting to layer more complex lighting on top of.

Near Linear Fast Falloff

Same as the Near Linear model except the lighting intensity falls off to practically nothing at the radius.