User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
0%
...it's awesome.
60%
...it's okay, I expected better.
20%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
20%
Total votes: 5

Who's online

There are currently 0 users and 38 guests online.

Welcome to RUST | Gamedesign.net

Quake 4 Ambient Light

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.

RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.