| Quake
II Evolved Per Pixel Lighting Tutorial
Adding
An Ambient Light
For
this tutorial you will need the following:
>> A
full copy of Quake 2, complete with the latest official
patch
>>
Quake
II Evolved version 0.65 Beta
>>
A popular level editor compatible
with Quake 2 (GTK Radiant 1.3 etc)
Ok then, lets
begin with a little information shall we?
What
is an Ambient Light?
Ambient lighting
is a lighting method that's just like your standard
light, only with a few modifications. Ambient lighting
casts no shadows at all, and makes no change the specular
map. It does make a change to the bump man, but non-directionally
(ie: lights comes from in-front the surface). It does,
however, mostly change the diffuse map. This is very
useful for blanket lighting, lighting huge areas with
little performance hit. Using a combination of ambient
lighting and point lights, you can create a very nice
looking outdoor area with little performance drop.
Adding
Ambient Lighting To Your Level
Once again, with
this tutorial we will build off what we have previously
done using standard lights.
Load up the first
tutorial file, as it contains many things already
done for you. Now, I want you to make a new shader
file for it so it looks
like this:
tut_3
{
ambientLight
lightFalloffImage _falloff
{
zeroClamp
map lights/tut_3.tga
colored
}
}
Save the file,
and reload. Done. That's all there is to it! Its a
simple flag that can be set in the shader to change
the light type from a normal light, to an ambient
light! How easy was that!
Here
is a .pk2 file with an example map. Simply type map
tut_3 in the console.
That about wraps
up our tutorial on Ambient Lighting. If you have any
questions please post them in our forums.
|