Report article RSS Feed Advanced Lighting

Using a combination of effects to achieve a nicer light effect

Posted by SgtJman on May 5th, 2007
Advanced Mapping/Technical.

Tutorial: Advanced Lighting
Sourced from

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.

Tutorial Image

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.

Tutorial Image

Tutorial Image

Tutorial Image

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

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.

Pitch changes the, well, pitch, the default is -90, we won’t need to change it.

Tutorial Image

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.

Tutorial Image

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.

Tutorial Image

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.

Tutorial Image

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

Tutorial Image

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

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.

Tutorial Image

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.

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.

Post comment Comments
micmac May 7 2007, 7:23pm says:

hey! awesome tutorial the only problem was the sprites arnt showing up! i get everything else to work but the sprites... can you maybe put on a example vmf or somthing.

+2 votes     reply to comment
Arkanj3l May 8 2007, 9:07am says:

The sprites always have to have the extension ".spr" on them. Hammer doesn't do this at first, you have to add it yourself.

+2 votes     reply to comment
Psalm May 7 2007, 7:43am says:

Though there are already a few lighting tutorials like this on Moddb, this one's pretty good! Nice work, SgtJman.

+2 votes     reply to comment
Biohaz@rd May 11 2007, 5:59am says:

Very nice tutorial. I've found it preety useful. Thanks Sgt Jman :P

+3 votes     reply to comment
CrowbarSka Jul 24 2008, 7:10am says:

This is probably one of the best lighting tutorials I've seen and it gives really great results, just like professional Valve lighting.

Maybe worth mentioning point_spotlights as well...?

+3 votes     reply to comment
VolcomChamp Aug 22 2008, 7:53pm says:

micmac, you have to add .vmt after the Sprite in the Sprite Name field.

+2 votes     reply to comment
mattman111 Sep 15 2008, 11:08am says:

ok it worked spirtes worked but when ever i go in the map the light is working but the whole map is perfectly lighted like no lights what so ever i want a darkish night map not a perfectly lighted map [with no light] make a tutorial how to make a nightish , dark map that you have to use your flash light

+2 votes     reply to comment
Ripe Nov 19 2008, 8:28am replied:

mattman111, use light_spot not light_dynamic.

+2 votes     reply to comment
Feared May 10 2009, 7:40pm says:

Images disappeared. :(

+2 votes     reply to comment
tymaxbeta Nov 10 2009, 10:54pm says:

a note to everyone, the only texture a func_dustmote will properly appear in game with is the trigger texture, if anyone has an issue with they're "dust" not appearing in game, that is most likely it...

+2 votes     reply to comment
half-life Nov 11 2009, 12:56am says:

ctrl+D = a bookmark of this page for me, I keep forgetting how to do this(3rd time I've had to learn it).

+2 votes     reply to comment
half-life Nov 12 2009, 2:14am says:

How do I get rid of the black border? It was working fine but when I did a compile this morning it had a black box around the sprite. :(

+2 votes     reply to comment
half-life Nov 12 2009, 6:50am says:

sorry for three posts but i fixed the problem by using light_glow2_add or something.

+2 votes     reply to comment
func_incendiary Nov 1 2010, 3:48am replied:

Or you can change the render FX to glow.


Oh ****, I am a year late.

+2 votes     reply to comment
Holymac Dec 8 2009, 10:39am says:

Great tutorial Man i really like it

+1 vote     reply to comment
Nawwx Feb 3 2010, 5:03pm says:

Thank you so freakin much! i never knew about that trick with func_dustmode and env_sprite T_T

+1 vote     reply to comment
Mooneh Mar 30 2010, 9:39am says:

hey nice tut, where are those lampsmodels from i rly love em and wanna use something that looks like it for my map ^^

+1 vote     reply to comment
MNKYband Jun 25 2011, 1:21pm says:

My map is always all lit up, and I can't put in a dark zone. Can someone tell me how to fix this?


+1 vote     reply to comment
MNKYband Jun 25 2011, 6:46pm replied:

Nevermind, I fixed it. But now my zombies' heads are all shiny, even when they are out of the light. Help?

+1 vote     reply to comment
CrAzY_LunaTIC Jul 12 2013, 5:25am says:

Also you COULD add a Point_spotlight for a more realistic looking effect. And dont overkill with the sprites They are a little eye raping. still great tutorial c:

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Report Abuse
Report article
Related Games
Half-Life 2
Half-Life 2 Single & Multiplayer First Person Shooter