WiseShapedLight: Creating shaped light

From Valve Developer Community
Jump to: navigation, search

This tutorial was originally created by wisemx.

Ported from SDKnuts.net to VDC by: Pinsplash (talk) 15:00, 21 July 2018 (UTC)

WiseShapedLight beam.png
The shaped brush in Hammer.

In WiseVol and WiseGarageDoor01, I’ve created several methods for beams of light. In this project I’ve created the appearance of a shaped beam of light from an open window.

In the image to the right you can see the subtle beam of light coming from the open window. Notice each end of the beam appear to be well within reason, or believable. The frame around the open window is well lit. The beam has a soft edge but is well defined. At the end is a bloom of light cast onto the brick wall. The shaped beam is created with a normal brush and the Clipping tool. Once the brush is shaped the way you want press Ctrl+T and convert it to func_illusionary then click Apply.

Typically you should never use any of the model\ materials on your brushwork. Creating illusionary volumes of shaped light is an exception to that rule. The material I’ve used on this shaped brush is: models/effects/vol_light001. With the Face Edit dialog ( Shift+A) I’ve applied this material to each face of this brush.

The FX amount for the func_illusionary has been changed from 255 to 150. Zero would be invisible and 255 is opaque. Experiment with this number for the effect you desire. One other change you need to make to the func_illusionary is to Disable Shadows and Receiving Shadows. We simply don’t want shadows on or from our shaped light. Reduce the size of your grid and be as precise as you can when you create these shaped brushes for your light. Just as important as the shaped brush and its properties are the light entities that will be shining on and through it.

To create lighting effects like this you simply can not use a normal light entity, at least not by itself.

The light on the wall, and the one shining through the shaped brush, is created with a combination of a light_spot and point_spotlight. For both of these use the Point At feature in the properties for their Pitch. Adjust the brightness, length and width until you have the effect desired. Make sure you check the flag No Dynamic Light for your point_spotlight. Allowing this entity to cast dynamic light can really impact in-game performance.

Inside the room with the window open I’ve placed two identical light entities to brighten up the room and to cast light onto the window frame. This is a good method to experiment with, create your other light entities first and then create normal light entities to supplement them.

See Also