Shadowfaces

Shadow-Casting Faces
World Shadowfaces
    -transshadow
BModel Shadowfaces
    _shadow


Shadow-Casting Faces

The main Qrad3 light-tracing formula tests the intersections between rays of light and solid, non-transparent world brushes. This means things like windows and liquids can't cast shadows.

ArghRad's shadowfaces are individual map faces (not whole brushes) set to block light. This allows transparent faces and non-solid brushes to cast shadows. There are two different methods for specifying shadowfaces - one for world faces, and one for BModel entities.

World Shadowfaces

The NODRAW surface property does not actually make faces invisible in the game. Invisibility actually relies on SKY, HINT, SKIP, PLAYERCLIP, MONSTERCLIP or ORIGIN flags.

This allows ArghRad to use NODRAW for another purpose. Setting the NODRAW property on visible, non-shadow-casting faces will make them cast shadows. Opaque faces fully block the light, and transparent faces can use several different methods to partially diminish the light.


 
 
-transshadow  value

location: command-line    version: 3.00  
value: 0 (no shadows),  1-4 (shadows) default: 4

A value of 0 disables casting shadows from all world shadowfaces. The specific behavior of transparent faces is defined by the -transshadow value:

1 - Ignores them.
2 - Casts single-color shadows (uses reflectivity color).
3 - Casts single-color shadows with texture's alpha mask.
4 - Projects the actual textures with texture's alpha mask.

The TRANS33 surface property makes shadows 33% opaque, and TRANS66 makes them 66%. An alpha mask makes the shadows even more transparent. This depends on the texture format: .TGA & .M32 use the alpha channel, .WAL & .PCX make the last palette color fully transparent. Setting both TRANS33 & TRANS66 is special - the shadow starts 100% black but also applies the texture's alpha mask (this supports a common Quake2-engine modification, but looks odd in the original game).

no example image example map
 

BModel Shadowfaces

The NODRAW method will not work with BModels. Fortunately there is another method available for these entities:


 
 
_shadow  value

location: bmodel entity    version: 3.00  
value: 0 (no shadows), 1-4 (shadows) default: 0

Non-zero values cause all of this BModel's faces to cast shadows. Opaque faces fully block the light. The behavior of transparent faces is defined by the _shadow value:

1 - Ignores them.
2 - Casts single-color shadows (uses reflectivity color).
3 - Casts single-color shadows with texture's alpha mask.
4 - Projects the actual textures with texture's alpha mask.

The TRANS33 surface property makes shadows 33% opaque, and TRANS66 makes them 66%. An alpha mask makes the shadows even more transparent. This depends on the texture format: .TGA & .M32 use the alpha channel, .WAL & .PCX make the last palette color fully transparent. Setting both TRANS33 & TRANS66 is special - the shadow starts 100% black but also applies the texture's alpha mask (this supports a common Quake2-engine modification, but looks odd in the original game).

Note: like all lighting, the shadows are static - they will remain in place even if the BModel moves or disappears.

no example image example map