AdmiralSakai and the Quest For Good Interior Lighting

#21

If you’re referring to block_light brushes, I think this is intended behavior. If you’re referring to lights on surface ‘spilling’ over past regular opaque brushes it’s a known bug.

0 Likes

#22

I’ve been using block_light brushes extremely heavily in pre-disaster Office Complex to seal off rooms from each other, prevent lighting pileup in long skinny rooms, and make darker areas under burnt-out lights and the like. However, I had been noticing problems where instead of just gating off areas from each other the block_light brushes were actually making things near but not inside of them dimmer, necessitating more and brighter lights in areas that were mostly delineated by them. A common problem was areas of darkness above windows or doors, since those were blocked off but set in an otherwise normal wall.

In retrospect, this makes a lot of sense. Block_light isn’t just an opaque brush, it’s a brush without lightmaps, meaning it actively swallows and removes light from the map where a regular brush (for instance, the walls around the windows) would reflect it.

The solution was to make a series of custom materials which reflect light, but are considered opaque to VRAD, but don’t actually render in the game. This is actually pretty easily done as follows:

"LightmappedGeneric"
{
        $color "{220 220 220}"
	$reflectivity "[1.0 1.0 1.0]"//Or however much you want.
	%compilenonsolid 1
	%compiledetail 1
	$alpha 0.0
}

The reason for the $color parameter instead of $basetexture is because $alpha 0 causes the material to render as invisible in Hammer as well, making it extremely hard to work with. Removing the $basetexture at least gets you a visible purple error texture without compromising in-game behavior.

The resulting material has does not cut visleaves, does not create any entities, and does not even have a texture file associated with it, making it extremely cheap to include in a map. It also does not interfere with weapons or the player’s flashlight.

Here’s an example hallway with block_light over the windows and the intersection


and the exact same map with ‘reflectoblock’:

1 Like