THE HANDY VANDAL'S ALMANAC
Game Design Resources for Half-Life
Home : Topics : Menu : Reviews
Almanac 2 : Xen Rebels

Site no longer actively maintained ... HV

"New Studies Reveal Link With Cattle Mutilation"
 

LIGHT
See also: Radiosity and Shadows
Updated January 10, 2004

 

Light - there are several kinds of light in Half-Life:

  • Entities - Light and Light_Spot entities both emit light. They can be switched off and on by triggering the entity
  • Textures - luminous textures light your world (this is done when you compile your maps). See Textures page
  • Sky texture - used with Light_Environment - see Sky page
  • Entity rendering - does not actually cast light, but can be used to brighten entities (or make them transparent, or invisible). This "apparent light" effect can be exploited -- for instance, even in a dark room, a player's silhouette will stand out against a brightly-rendered Func_Wall ....
  • The HEV Suit flashlight casts light.
  • The red dot of Weapon_RPG is a kind of light, I suppose
  • Various other weapons cause flashes of apparent light when used -- these flashes are actually sprites - these don't actually cast light onto the world.
  • The Xen_Plantlight entity emits light ... kind of: actually, the Plantlight responds to touch by activating ANY ENTITY (usually a light, but you could substitute other entities!)

Light Entities

More Tutorials

 

 

Switchable Texture Lighting (requires ZHLT 2.5.3 Custom Build 1.7)

"All texlights can now pulse, flicker, and switch on and off, just like normal light entities. To use this feature, you need to set the 'style' value on the brush entity which has the light-emitting texture. If your .fgd doesn't include style values, you can add the following to any entity...

style(choices) : "Texlight style" : 0 =
[
0 : "Normal"
-3: "Grouped"
10: "Fluorescent flicker"
2 : "Slow, strong pulse"
11: "Slow pulse, noblack"
5 : "Gentle pulse"
1 : "Flicker A"
6 : "Flicker B"
3 : "Candle A"
7 : "Candle B"
8 : "Candle C"
4 : "Fast strobe"
9 : "Slow strobe"
12: "Underwater"
]

The Grouped setting is essentially a hack to allow your texlights to be switchable. To use it, create a brush entity with texlights on it, and set its style to Grouped; then create a light entity with the same name as the brush entity.

Hlrad will now pretend that the light emitted by the texlight is "really" being emitted by your light entity! In other words, turning the light on and off will now turn the texlights on and off, too. (You'll probably want to set the brightness of the light entity to 0.01, so that it emits no light of its own.) (This trick is unnecessary if you're using Spirit of Half-Life, which supports switchable texlights directly.)"

Source:
http://collective.valve-erc.com/data/docs/1034150354-69206000/files/instructions.html

 

Lighting Problems

There are two main kinds of lighting, each can fail in its own way:

* Light entity - if it won't light, trying setting the color

* Texture lighting - this requires a valid "lights.rad" file - a text file containing names of luminous textures, and color/brightness.

In some versions of hammer, the "lights.rad" file is empty -- if so, copy text from "valve.rad" into "lights.rad".

Also make sure that "lights.rad" is in the correct directory. This depends on your compiler -- I use Zoner's HL Tools, so my "lights.rad" goes in the "C:\apps\zhlt\" folder. (If using the Hammer-supplied compiler tools, I think that "lights.rad" goes in the "C:\app\hammer" directory. But you should use Zoner's tools -- much superior to standard Hammer compilation.)

 

Moon Light

Q: How to simulate moon light?

I think what would like nice is a combination of several lights -- grey and dark blue. (Don't use white, it's too bright.) You might want to pick a shade of grey that is almost black. As for the blue, probably a very dark blue (because light blue is too bright.)

If you use sky brushes and make them emit light, then you can only use one color ... I think probably either dark grey or dark blue here, plus maybe additional light entities (maybe spotlights?) to add accents.

 

Vis, Rad, and .Bsp File Size

Q: Is my map file size huge because of all these patches?

A: Yes, VIS and RAD information does increase the size of the resulting .bsp file."

- Richard Neff - Rust forum post @ GameDesign.Net

 

 
LIGHT
Handy Vandal's Almanac Logo

"Handy Vandal" and "Handy Vandal's Almanac" copyright 2008 by Karl Gregory Jones
Almanac: Half-Life : Half-Life 2
Xen Rebels
karljones.com
Contact the Handy Vandal

Half-Life © 1998-99 Sierra On-line and Valve L.L.C. All rights reserved. Half-Life and the Half-Life logo are trademarks of Sierra On-Line. Valve and the Valve logo are trademarks of Valve L.L.C. Half-Life images, textures, music, sound effects, and other graphic or audio content © 1998-99 Valve L.L.C. All rights reserved.