Enter Half-Life Re-imagined, our current competition!
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, EsBe, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

6

Cobalt

9

Turquoise

1

Cyan

4

Royal

3

Teal

1

Onliners

1 mins

Solokiller

2 mins

TJB

10 mins

Admer456

12 mins

Victor-933

15 mins

SpannerSpammer

19 mins

Jessie

57 mins

Kurosaki Ichigo

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

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?

sprite.jpg
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

    KEY VALUE
    Render FX (renderfx) Normal (0)
    Render Mode (rendermode) Additive (5)
    FX Amount (renderamt) Set however you want
    FX Color (rendercolor) Set however you want

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

  • Glow

    KEY VALUE
    Render FX (renderfx) Normal (0)
    Render Mode (rendermode) Glow (3)
    FX Amount (renderamt) Set however you want
    FX Color (rendercolor) Set however you want

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

  • Constant Glow

    KEY VALUE
    Render FX (renderfx) Constant Glow (14)
    Render Mode (rendermode) Glow (3)
    FX Amount (renderamt) Set however you want
    FX Color (rendercolor) Set however you want

    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).