Submitted by
Method on Sat, 2005-10-22 07:45.
Quake 4 Ambient Light
by Method
INTRO
I was wondering how Raven achieved that ambient light in their maps. So I looked through the levels and checked to see how many light entities overlap by using "r_showlightcount 1" command. I noticed that there's no black color, that means that every surface is lit with a light. I hid the light entities in the editor and tested to see if the level would still be lit. It wasn't, so the next thing I did, was enable light boundaries, which revealed a huge light box that covered the whole map. I looked at the Light Editor and noticed that the light entity has an ambient texture.
CREATING AMBIENT LIGHT
Make a light entity and resize it, so it covers the whole level. Then select it and press "J" to go into the Light Editor. Uncheck Cast checkboxes, except Cast Diffuse. In the texture scrollbox, pick "lights/ambientlight_nofall". Next you need to pick an ambient color, but make sure to lower the value scale on the right, so it'll be close to black. Play around with it, to see how it lights the level.
EXAMPLE
I'll use a map, which I recently begun designing as an example:
Without ambient light (ambient light color set to black)
With ambient light (ambient light set to dark grey)
AMBIENT LIGHT SHADER
Here's the shader for the ambient light:
lights/ambientLight_nofall
{
ambientLight
lightFalloffImage _white
{
map _white
colored
zeroClamp
}
}
OUTRO
You can extract .map files from q4base/pak002.pk4 with WinZip and load those files in the editor. Look through the maps to see Raven's lighting techniques.