Constant/Linear/Quadratic light

Since lots of people are having trouble with lighting I’m making this my first tutorial. I’m going to assume you know how to place lights, light_spots and make a basic room.

First I’m going to say lighting is important because it’s the main aspect of atmosphere. Without atmosphere your map will be very bland and boring.

Say if you have a “light” entity in your map. This brightness from this light will “falloff”, that means the further the light gets from the entity; the dimmer it becomes. The “constant”, “linear” and “quadratic” values are important in controlling this falloff in a light entity.

You can see in the picture the difference constant, linear and quadratic light makes:

Lighting tutorial 1

Standard the quadratic value is “1”. What this means it that the light uses 100% quadratic falloff. So the light falls off very quickly for a sharp contrast and dark shadows in the environment. If you don’t want dark shadows or “softer” lighting, you can use the linear or constant values.

I use these values for a softer light that doesn’t give dark shadows but still looks nice and bright:

  • Constant: 0
  • Linear: 3
  • Quadratic: 2

As you can see, you can mix values together. With these values there is 60% linear light and 40% quadratic light. (3+2=5, 100/5=20, 3×20=60, 2×20=40…..for the math kids)


1 Response to “Constant/Linear/Quadratic light”

  1. 1 Deadeye
    19 June, 2008 at 22:03

    Thanks for enlightening me with this tutorial Chuck 😛

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: