Login

Tutorials

Advanced Lighting

Intro:
Most people who map in hammer use the light entity to create their desired lighting effects. When investigating with lighting the first time they might try a light_spot, but find it too dull with horrid beam angles, so they’ll stick with the light method. Now this is not the “wrong” way of doing things, but there is a better way.

By looking at the way Counter-Strike and Half-Life 2 maps are made there are a lack of light entities and an abundance of light_spot entities. This might seem odd, as from what we’ve seen light_spots are shitty, but valve use them everywhere.

Light_spots are, once you know how to use them, a much more natural lighting effect than lights, they are directed, light bulbs usually have a 75 degree angle, not 360. the Light_spot method combined with a few other techniques can really improve the lighting in your maps.

Prop_static:
Lights look stupid unless they are coming from somewhere, a good prop_static gets rid of this problem. A good way to find one is simply search “light” in the model selecting GUI. I decided on models/props/cs_office/light_shop.mdl

Light_spot:
Place and aim the light_spot where you want it, in our case it is aiming directly down and placed right underneath the chosen model. Be careful not to let the origin of the entity (small cross in middle of 2d view) intersect with any geometry or it will not work correctly.

Change the beam angles; there are two to change, the inner (bright) and outer (fading) angles. If you want a light bulb effect choose 30-60 for the bright angle, and anything larger than this for the fading angle. I choose 60 and 75.

To sort the color and intensity change brightness, this is the same with lights. Brightness is set up with standard RGB inputs, but the fourth is intensity. Lights have a default of 500, light_spots 200, which explains why they shunned due to dullness. Change this value to 400-600, I’m using 500. The color you choose should be faded and dull, never choose white, no lights are white, light bulbs are yellow, fluorescent lights blue. I’m using 201 213 224 this is probably the closest you’ll want to get to blue. The other settings can be tinkered with, but don’t really make it any nicer looking. If you are using HDR, you don’t need to change anything settings, its all automatic.

Env_sprite:
To give a light that glow effect, the best choice is env_sprite of env_lightglow. Personally I use the env_sprite because valve also use them a lot, and they know what they are doing.

Place the env_sprite either very close, or inside the light model. If it is a long light, two or three may be required.

Firstly choose your sprite name, any of the “light_glow” series will be perfect. I choose light_glow3.

NOTE: You must add “.vmt” after the string or it won’t load the sprite material

Now you need to set the sprite up to work as a lighting sprite. Change the render mode to world space glow, change the FX amount to somewhere between 100 and 255, depending on how bright you want it to seem, I’m using 200. You also need to choose your FX color, you can just copy over your light_spots color here to get the desired effect.

If you wish, change the scale, 0.75 works pretty well, so I’m using that.

Size of proxy geometry refers to how much space the sprite needs to be in front of geometry, if it is inside a model for example. Don’t make it too large of it will appear though unwanted geometry. I’m using 3.

Also tick Start On in the flags

Func_dustmote:
Sometimes when you see light beams there are bits of dust floating underneath, though they seem to disappear as soon as they leave the light beam. This would be neat to see in a map, luckily, the source engine make this easy to replicate.

Create a cone brush, clip off the top, and stretch to the size of your light. Tie it to a func_dustmote. You can use any texture for this brush, I use trigger, but this may cause engine problems or confusion with trigger entities, so nodraw might be a better alternative.

The particle color should be the same as your light_spot and env_sprite.

Particles per second, is how dense you want your particles, 10 works for me

Minimum particle size around 10, maximum around 15, alpha 255.

Note:
If you find by using the light_spot your ceiling is too dark, simply add a dull (around 50) light_spot about 32 units off the ground, facing up (pitch 90) with a wide angle to make it more real.