VERC: Glowing Sprites Last edited 5 years ago2019-04-21 12:01:54 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
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.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.

Here I have listed keyvalues needed to create each sprite.

Additive

Doesn't fade as it gets further away, crosses into brushes

Glow

Fades as it gets further away, doesn't cross into brushes

Constant Glow

Doesn't fade as it gets further away, doesn't cross into brushes

For other properties such as FX Amount, check the links below.
There are many other good articles about sprites.

See also: If you still have problems, go to valve-erc's forum and ask a question. There are kind people awaiting to help you (I hope).
This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.