✔️ Download example map
Most of the brush-based entities (like the
func_
type) and point-based monster entities have a set of basic rendering properties. They are:
- Render FX (
renderfx
)
- Render Mode (
rendermode
)
- FX Amount (
renderamt
)
- FX Color (
rendercolor
)
I'll be talking about them in this tutorial, so get ready...
Render FX (renderfx
)
Render FX is probably the simplest property - it sets any special effects that the entity is rendered with, such as fading in and out, flickering etc. You may need to tweak the other properties before the effect looks good though. I used the
hologram FX for the hologram woman on the left in the example map.
Render Mode (rendermode
)
Render Mode is a pretty fundamental part of the rendering properties - it sets the way in which the entity is rendered. The options are:
- 0 - Normal: This is the default, plain, solid rendering mode.
- 1 - Color: Setting this replaces the entity's texture with the color specified in FX Color. The FX Amount controls the translucency. It doesn't affect model entities or sprites.
- 2 - Texture: Texture mode allows you to make an entity translucent, and I've been over it in my glass tutorial. FX Amount controls the level of translucency. The hologram on the right in the example map is using this mode.
- 3 - Glow: This mode (it's almost an effect) only works with sprites, and makes them scale down as the player approaches, and fade away as the player moves back. This is a realistic way of creating halo effects for lights. It also overlays geometry that would normally obscure sprites (providing the player can see the center of the sprite). The Constant Glow setting in Render FX cancels the resizing. FX Amount controls translucency, and FX Color sets the color of the sprite. I've covered the use of this in context in the Using Sprites tutorial.
- 4 - Solid: Solid allows you to make the blue parts of masked textures (ones beginning with '{') transparent. Things like fences and grates are often masked because they are too complex to be created in geometry. I have put a demonstration into the example map - the fence on the left looks realistic, but it's actually just one brush made into a func_illusionary (see below) with solid set, and FX Amount set to 255.
- 5 - Additive: Additive mode is most often used for things like steam sprites, or for holograms, such as the one on the right in the example map. Combined with the hologram Render FX setting, an effect like the one seen in the Half-Life Hazard Course is created. Basically the colors of the entity are 'added' to the colors behind, which gives a brighter look. An example of this can be found in the Using Sprites tutorial.
FX Amount (renderamt
)
This property usually controls the translucency of the effect, and can have a value ranging from
1 to
255, with
1 being totally invisible, and
255 being opaque.
FX Color (rendercolor
)
Only two
Render Modes use this property -
Color and
Glow (although some entities, such as
env_beam need a color, it isn't called
FX Color in SmartEdit). A pretty self-explanatory property - it sets the color.
On brush entities, this doesn't affect the color, but instead is used to determine the scrolling speed of textures which are prefixed with
SCROLL
. The red value is a boolean determining direction, and the green and blue values are read together as a 16-bit integer determining speed. On
func_conveyor, the appropriate rendercolor is automatically set via game code based upon the
speed
KV, but it can also be manually defined for other entities (such as
func_illusionary).
Making a Real Fence
You might have noticed that in some areas in Half-Life, there are fences that the player can shoot through. It's a simple idea, but it requires a little trick to set up.
You will notice that some entities, including the
monster_generic ones that are in the example map as holograms, have a flag called
Not Solid that allows you to let the player to walk through them. This has obvious uses, such as... well... for making a hologram. But it won't work for fences, because, firstly,
func_wall entities don't have a
Not Solid flag, and even if they did, the player would be able to move though as well as bullets. But there is a way round this problem.
It just so happens that
func_illusionary was designed to be, um, illusionary, so it's basically a non-solid
func_wall, and can be made to display masked textures in the same way as a normal
func_wall. Then, to stop the player moving though, you can simply create a 'clip' brush - Select the texture called 'clip', and create a brush. This stops the player moving through, but not bullets... and not monsters. To stop the monsters, create another brush with some texture other than 'clip', and bind it to a
func_monsterclip entity. Place all three brushes over each other, and you have a 'real' fence!
Holographic.
Best to keep it a non special texture for it to work properly.