Q3Radiant Shader Manual
4 Q3MAP Specific Shader Keywords
These keywords change the physical nature of the textures and the brushes that are marked with them. Changing any of these values will require the map to be re-compiled. These are global and affect the entire shader.
For consistency's sake, this really should have been called q3map_tessSize. But it wasn't. The tessSize shader controls
the tessellation size (how finely a surface is chopped up in to triangles), in game units, of the surface. This is only
applicable to solid brushes, not curves, and is generally only used on surfaces that are flagged with the deformVertexes keyword. Abuse of this can create a huge number of triangles. This happens during q3map processing, so maps must be reprocessed for changes to take effect.
Design Note: It can also be used on tesselating surfaces to make sure that tesselations arelarge, and thus, less costly in terms of triangles created.
This allows a brush to use a different shader when you are inside it looking out. By way of example, this would allow a water brush (or other) surfaces to have a different sort order (see sort above) or appearance when seen from the inside.
Use this shader in the global keyword commands whenever the tcMod scale function is used in one of the later render stages. Many problems with getting shader effects to work across multiple adjacent brushes are a result of the way q3map optimizes texture precision. This option resolves that, but at the expense of some precision of the textures when they are far away from the origin of the map.
This keyword in a sky shader will create the illusion of light cast into a map by a single, infinitely distance light source (sun, moon, hellish fire, etc.). This is only processed during the lighting phase of q3map.
<red><green> <blue> Color is described by three normalized rgbvalues. Color will be normalized to a 0.0 to 1.0 range, so it doesn't matter what range you use.
<intensity> is the brightness of the generated light. A value of 100 is a fairly bright sun. The
intensity of the light falls off with angle but not distance.
<degrees> is the angle relative to the directions on the map file. A setting of 0 degrees equals east. 90
isnorth, 180 is west and 270 is south.
<elevation> is the distance, measured in degrees from the horizon (z value of zero in the map file). An
elevation of 0 is sunrise/sunset. An elevation of 90 is noon.
The texture gives off light equal to the <light value> set for it. The relative surface area of the texture in the world affects the actual amount of light that appears to be radiated. To give off what appears to be the same amount
of light, a smaller texture must be significantly brighter than a larger texture. Unless the qer_lightimage keyword is used to select a different source for the texture's light color information, the color of the light will be the averaged color of the texture.
The keyword q3map_lightimage generates lighting from the average color of the TGA image specified by the
Sky shaders should probably still have aq3map_surfacelight
value. The "sun" gives a strong directional light, but doesn't necessarily give the fill light needed to soften and illuminate shadows. Skies with clouds should probably have a weaker q3map_sun
value and a higher q3map_surfacelight
value. Heavy clouds diffuse light and weaken shadows. The opposite is true of a cloudless or nearly cloudless sky. Insuch cases, the "sun" or "moon" will cast stronger, shadows that have a greater degree of contrast.
Design Trick: Not certain what color formula you want to use for the sun's light? Try this. Create a light entity. Use the Q3Radiant editor's color selection tools to pick a color. The light's _color key's value will be the normalized RGB formula. Copy it from the value line in the editor (CTRL+c) and paste it into your shader.
The keyword sequence for generating light on a q3map_surfacelight should be ordered as follows:
- q3map_lightimage ; (the texture providing the light and the color of the light)
- qer_editorimage ; (the editor-only image used to select the source map for the texture)
- the average color of the light emitted from the shader is calculated from the lightimage.)
The reason q3map_lightimageis specified for the light in the example below, is because the blend map is predominantly yellow, and the designer wanted more yellow light to be emitted from the light.
Example: Taking light from another source texture
// this TGA is the source for the color of the blended light
//base TGA (used because the shader is used with several
// different light values
//emitted light value of10,000
//source texture is affected by the lightmap
// this command handles the overbright bits created by "sunlight"
// in the game
This allows the user to define how large, or small to make the subdivisions (triangles) in a textured surface, particularly aimed at light-emitting textures like skies. It defaults to 120 game units, but can be made larger (256 or 512) for sky boxes or smaller for light surfaces at the bottoms of cracks. This can be a dominant factor in processing time for q3map lighting.
All surfaceparm keywords are preceded by the word surfaceparm as follows: surfaceparm fogor surfaceparm noimpact.
This keyword applied to a texture on a brush, patch or model will cause the lighting phase of the q3map process to use the texture's alpha channel as a mask for casting static shadows in the game world.
Design Note: Alphashadow does not work well with fine line detail on a texture. Fine lines may not cast acceptable shadows. It appears to work best with well-defined silhouettes and wider lines within the texture. Most of our tattered banners use this to cast tattered shadows.
A brush marked with this keyword functions as an area portal, a break in the Q3MAP tree. It is typically placed on a very thin brush placed inside a door entity (but is not a part of that entity). The intent is to block the game from processing
surface triangles located behind it when the door is closed. It is also used by the BSPC (bot area file creation compiler) in the same manner as a clusterportal. The brush must touch all the structural brushes surrounding the
A brush marked with this keyword function creates a subdivision of the area file (.aas) used by the bots for navigation. It
is typically placed in locations that are natural breaks in a map, such a sentrances to halls, doors, tunnels, etc. The intent is keep the bot from having to process the entire map at once. As with the the areaportal parameter, the affected brush must touch all the structural brushes surrounding the areaportal.
Read as "do not enter." Like clusterportal, this is a bot-only property. A brush marked with donotenter will not affect
non-bot players, but bots will not enter it. It should be used only when bots appear to have difficulty navigating around some map features.
This will cue different sounds (in a similar manner to metalsteps) and cause blood to appear instead of bullet impact flashes.
Fog defines the brush as being a "fog" brush. This is a Q3MAP function that chops and identifies all geometry inside the
brush. The General shader keyword fogparms must also be specified to tell how to draw the fog.
Assigns to the texture the game properties set for lava. This affects both the surface and the content of a brush.
The player sounds as if he is walking on clanging metal steps or gratings. Other than specifiying flesh, metalsteps, nosteps, or default (i.e. specify nothing) it is currently not possible for a designer to create or assign a specific sound routine to a texture. Note: If no sound is set for a texture, then the default footsteps sound routines are heard.
The player takes no damage if he falls onto a texture with this surfaceparm
Read as "No DeeLight". A texture containing this parameter will not be affected or lit by dynamic lights, such as
weapon effects. And example in Quake III Arena would be solid lava.
A texture marked with nodraw will not visually appear in the game world. Most often used for triggers, clip brushes, origin
brushes, and so on.
When a player dies inside a volume (brush) marked nodrop, no weapon is dropped. The intend use isfor "Pits of Death." Have a kill trigger inside a nodrop volume, and when the players die here, they won't drop their weapons. The intent is to prevent unnecessary polygon pileups on the floors of pits.
World entities will not impact on this texture. No explosions occur when projectiles strike this surface and no marks
will be left on it. Sky textures are usually marked with this texture so those projectiles will not hit the sky and leave
Projectiles will explode upon contact with this surface, but will not leave marks. Blood will also not mark this surface.
This is useful to keep lights from being temporarily obscured by battle damage.
Design Note: Use this on any surface with a deformVertexes keyword. Otherwise, the marks will appear on the unmodified surface location of the texture with the surface wriggles and squirms through the marks.
This texture does not have a lightmap phase. It is not affected by the ambient lighting of the world around it. It does not
require the addition of an rgbGen identity keyword in that stage.
The player makes no sound when walking on this texture.
This attribute indicates a brush, which does not block the movement of entities in the game world. It applied to
triggers, hint brushes and similar brushes. This affects the content of a brush.
Used on the "origin" texture. Rotating entities need to contain an origin brush in their construction. The brush must be
rectangular (or square). The origin point is the exact center of the origin brush.
Blocks player movement through a nonsolid texture. Other game world entities can pass through a brush marked
playerclip. The intended use for this is to block the player but not block projectiles like rockets.
This surfaceparm included in a texture should give it significantly reduced friction.
Assigns to the texture the game properties for slime. This affects both the surface and the content of a brush.
This surface attribute causes a brush to be seen by the Q3MAP process as a possible break-point in a BSP tree. It is used
as a part of the shader for the "hint" texture. Generally speaking, any opaque texture not marked as "detail" is, by
default, structural, so you shouldn't need to specify this.
Tells q3map that pre-computed visibility should not be blocked by this surface. Generally, any shaders that have blendfuncs
should be marked as surfaceparm trans.
Assigns to the texture the game properties for water.
Back | Home | Next