Onliners

Affiliates

Glowing Sprites

By Masahiro Sakuta

In this article I will explain how to achieve a glowing sprite effect.

What is a sprite?

A sprite is a texture seen in game, without transformation to look 3D, so that it looks as if it always faces the player. You may have seen one if you played the game any.

There are several types of sprites available that have different purposes. One is used for water drips, another is used for bubbles, and another is used for blood splash. But the one that I'm going to deal with is used to produce a glowing effect.

Types of Glowing Sprites

You can choose appearances of glowing sprites from 3 types. But for glowing sprites, there aren't many choices.
There are Additive, Glow, and Constant Glow appearances. What will they actually look like?

To right, Constant Glow, Glow, and Additive.

You will see the differences in the image above.
Note that the Glow sprite becomes larger and fainter as it gets further away from the player. Also, the Additive sprite is crossing into the ceiling, which may not be the effect you want to achieve.
Constant Glow is mixture of the two. It doesn't get larger and fainter, and it does not cross into the ceiling.

Constant Glow isn't perfect. The Half-Life engine determines whether render or not to render by considering if player can see the sprite's center. It works fine in most cases, but it doesn't hide behind a model. For example, the glowing in the gargantua's eyes can be seen from his back.
This does not occur with Additive sprites.

How do I put one in a map?

To put a sprite in a map, you need to use an env_sprite or an env_glow.
As far as I know, both are essentially the same except for their spawnflags. Both can be used to achieve the glowing effect, but the env_glow is meant to be a glowing effect.

Create a point entity in Worldcraft/Hammer, and set it to env_sprite or env_glow. Set Sprite Name to "sprites/glow01.spr" or any other.
Sprite Scale doesn't matter in the Glow render mode.