[GUIDE] Let's talk about lighting.

xzzy

aa
Jan 30, 2010
815
531
2fort always seems to find some new way to blow my mind when I open it to check how Valve did something.

It's a shame the map is so lame to actually play, because otherwise it's a masterpiece.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,699
2,581
2fort always seems to find some new way to blow my mind when I open it to check how Valve did something.

It's a shame the map is so lame to actually play, because otherwise it's a masterpiece.
And then you get mistakes like this:

7438DA5164AD875F2826B0873406EC4BB47ED13B
 
Jan 8, 2011
397
393
Trememdous thanks, yyler. I'm almost as clueless about lights as I am about optimization, and this examination of techniques gave me a few good ideas, especially since I'm making a night map (or rather, was making - the file has disappeared).
 
Oct 6, 2008
1,965
450
Sorry to bump these but they might be a good add on to this great resource.

Can you explain what phantom lighting is and how it works i.e. when is a good time to use it and how to use it effectively?

Fall off - I've tried to use them but have never been successful at it.

Also - perhaps moving light entities. i.e. putting a headlight on the front of a train so you can see the lights coming out of a tunnel before the train is seen.

Thanks :)
 

YM

LVL100 YM
aa
Dec 5, 2007
7,158
6,079
Fall off works best with helpers :helpers: on, so that you can see exactly where it hit 50% and where it hits 0% You can drag-resize these spheres in hammer's 2D views making them pretty hands. IMHO the 50% and 0% fall off things are more useful for really dark areas, of which there aren't many in TF2. I used them a lot when I was doing singleplayer level design.

I use the Quadratic, Linear and Constant fields far more in TF2.
They are described excellently here: https://developer.valvesoftware.com/wiki/Constant-Linear-Quadratic_Falloff

Most of the time I simply stick 1 in each. It removes the bright blob and helps the light go a little further.


Phantom lighting is when the light has no obvious source. Usually best to use soft lighting that isn't going to show any obvious directionality in shadows it casts. The Linear and Constant fields are useful here because they smooth out the gradient cast.
 

wareya

L420: High Member
Jun 17, 2012
493
191
Actually that 2fort window light is fairly realistic to the alternative if you consider how the human eye's dynamic range works IRL (hint: not at all like HDR in any game ever played on an SRGB-or-worse monitor) and how source engine reflection isn't as bright as it should be. Maybe a couple tiers too bright, but definitely more realistic for it to be there than for it to not be there.
 
Oct 6, 2008
1,965
450
Starting to work on my lighting now and I was wondering if there were any best practices you guys go for - is it better to start off with phantom lighting or do you guys do the main lighting first then add in the phantom afterwards?

I'm asking because it's an all interior cave map.
 

henke37

aa
Sep 23, 2011
2,075
515
I recommend a mix. Start with any obvious light sources like big spotlights and what not that are there at least partly for style.
 

wareya

L420: High Member
Jun 17, 2012
493
191
I typically do phantom lighting only for alphas, and sourced lighting only past alpha. Of course, the sourced lighting matches up with the old phantom lighting in terms of what areas are how well-lit, but doing it like that makes it easier for me to get things good, rather than harder.
If I can't come up with a reasonable light source when I get to detailing, I'm doing something wrong.
The "use phantom lights on night maps" bothers me because they have weird feathering and padding that actual moonlight wouldn't, and areas outside of the map end up almost totally unlit.