mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
8037810110
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@177 8a3a26a2-13c4-0310-b231-cf6edde360e5
197 lines
No EOL
14 KiB
HTML
197 lines
No EOL
14 KiB
HTML
<html>
|
|
<head>
|
|
<title>Quake III Arena Shader Manual: Specific Shader Keywords</title>
|
|
<link rel = "stylesheet" type = "text/css" href = "../styles/q3rad.css">
|
|
</head>
|
|
<body>
|
|
<h1 class = "MsoTitle">Q3Radiant Shader Manual</h1>
|
|
<hr>
|
|
<h1>4 Q3MAP Specific Shader Keywords</h1>
|
|
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.
|
|
|
|
<h2><a name = "tessSize">4.1 tessSize <amount></a></h2>
|
|
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 <b>deformVertexes</b> 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.
|
|
|
|
<p><div class = "tip"><b>Design Note:</b> It can also be used on tesselating surfaces to make sure that tesselations arelarge, and thus, less costly in terms of triangles created.</div>
|
|
|
|
<h2><a name = "backshader">4.2 q3map_backshader <shadername></a></h2>
|
|
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 <b><i>sort</i></b> above) or appearance when seen from the inside.
|
|
|
|
<h2><a name = "globaltex">4.3 q3map_globaltexture</a></h2>
|
|
Use this shader in the global keyword commands whenever the <b>tcMod scale</b> 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.
|
|
|
|
<h2><a name = "mapsun">4.4 q3map_sun <red> <green> <blue> <intensity> <degrees> <elevation></a></h2>
|
|
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.
|
|
|
|
<p><b><red><green> <blue></b> 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.
|
|
|
|
<br><b><intensity></b> 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.
|
|
|
|
<br><b><degrees></b> 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.
|
|
|
|
<br><b><elevation></b> 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.
|
|
|
|
<p><div class = "tip"><b>DESIGN NOTE:</b> Sky shaders should probably still have a<b>q3map_surfacelight</b> 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 <b>q3map_sun</b>value and a higher <b>q3map_surfacelight</b> 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.
|
|
|
|
<p><b>Design Trick:</b> 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.</div>
|
|
|
|
<h2><a name = "surflight">4.5 q3map_surfaceLight <light value></a></h2>
|
|
|
|
The texture gives off light equal to the <b><light value></b> 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.
|
|
|
|
<h2><a name = "lightimg">4.6 q3map_lightimage <texturepath/texturename></a></h2>
|
|
The keyword <b>q3map_lightimage</b> generates lighting from the average color of the TGA image specified by the
|
|
q3map_lightimage.
|
|
|
|
<p>The keyword sequence for generating light on a <b>q3map_surfacelight</b> should be ordered as follows:
|
|
|
|
<ol><li><b>q3map_lightimage</b> ; (the texture providing the light and the color of the light)
|
|
<li><b>qer_editorimage</b> ; (the editor-only image used to select the source map for the texture)
|
|
<li>the average color of the light emitted from the shader is calculated from the <b>lightimage.</b>)</ol>
|
|
|
|
<p>The reason <b>q3map_lightimage</b>is 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.
|
|
|
|
<p align = "center"><strong>Example: Taking light from another source texture</strong>
|
|
|
|
<p><pre class = "type">
|
|
textures/eerie/ironcrosslt2_10000
|
|
{
|
|
q3map_lightimagetextures/gothic_light/ironcrosslt2.blend.tga
|
|
// this TGA is the source for the color of the blended light
|
|
|
|
qer_editorimagetextures/gothic_light/ironcrosslt2.tga
|
|
//base TGA (used because the shader is used with several
|
|
// different light values
|
|
|
|
q3map_surfacelight 10000
|
|
//emitted light value of10,000
|
|
|
|
{
|
|
map $lightmap
|
|
//source texture is affected by the lightmap
|
|
rgbGen identity
|
|
// this command handles the overbright bits created by "sunlight"
|
|
// in the game
|
|
}
|
|
{
|
|
maptextures/gothic_light/ironcrosslt2.tga
|
|
blendFunc filter
|
|
rgbGen identity
|
|
}
|
|
{
|
|
maptextures/gothic_light/ironcrosslt2.blend.tga
|
|
blendFunc add
|
|
}
|
|
}
|
|
</pre>
|
|
|
|
<h2><a name = "lightsub">4.7 q3map_lightsubdivide <value></a></h2>
|
|
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.
|
|
|
|
<h2><a name = "surfparm">4.8 surfaceparm <parm></a></h2>
|
|
|
|
<p>All surfaceparm keywords are preceded by the word surfaceparm as follows: <b>surfaceparm fog</b>or <b>surfaceparm noimpact.</b>
|
|
|
|
<p><div class = "subheading">4.8.1 alphashadow</div>
|
|
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.
|
|
|
|
<p><div class = "tip"><b>Design Note:</b> 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.</div>
|
|
|
|
<p><div class = "subheading">4.8.2 areaportal</div>
|
|
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 <b>
|
|
areaportal</b>.
|
|
|
|
<p><div class = "subheading">4.8.3 clusterportal</div>
|
|
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 <b>areaportal</b>.
|
|
|
|
<p><div class = "subheading">4.8.4 donotenter</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.5 flesh</div>
|
|
This will cue different sounds (in a similar manner to metalsteps) and cause blood to appear instead of bullet impact flashes.
|
|
|
|
<p><div class = "subheading">4.8.6 fog</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.7 lava</div>
|
|
|
|
<p>Assigns to the texture the game properties set for lava. This affects both the surface and the content of a brush.
|
|
|
|
<p><div class = "subheading">4.8.8 metalsteps</div>
|
|
The player sounds as if he is walking on clanging metal steps or gratings. Other than specifiying <b>flesh</b>, <b>metalsteps</b>, <b>nosteps</b>, 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.
|
|
|
|
<p><div class = "subheading">4.8.9 nodamage</div>
|
|
The player takes no damage if he falls onto a texture with this surfaceparm
|
|
|
|
<p><div class = "subheading">4.8.10 nodlight</div>
|
|
Read as "No <i>Dee</i>Light". A texture containing this parameter will not be affected or lit by dynamic lights, such as
|
|
weapon effects. And example in <i>Quake III Arena</i> would be solid lava.
|
|
|
|
<p><div class = "subheading">4.8.11 nodraw</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.12 nodrop</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.13 noimpact</div>
|
|
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
|
|
marks.
|
|
|
|
<p><div class = "subheading">4.8.14 nomarks</div>
|
|
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.
|
|
|
|
<p><div class = "tip"><b>Design Note:</b> 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.</div>
|
|
|
|
<p><div class = "subheading">4.8.15 nolightmap</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.16 nosteps</div>
|
|
The player makes no sound when walking on this texture.
|
|
|
|
<p><div class = "subheading">4.8.17 nonsolid</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.18 origin</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.19 playerclip</div>
|
|
Blocks player movement through a <b>nonsolid</b> texture. Other game world entities can pass through a brush marked <b>
|
|
playerclip</b>. The intended use for this is to block the player but not block projectiles like rockets.
|
|
|
|
<p><div class = "subheading">4.8.20 slick</div>
|
|
This surfaceparm included in a texture should give it significantly reduced friction.
|
|
|
|
<p><div class = "subheading">4.8.21 slime</div>
|
|
Assigns to the texture the game properties for slime. This affects both the surface and the content of a brush.
|
|
|
|
<p><div class = "subheading">4.8.22 structural</div>
|
|
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 "<b>detail</b>" is, by
|
|
default, <b>structural,</b> so you shouldn't need to specify this.
|
|
|
|
<p><div class = "subheading">4.8.23 trans</div>
|
|
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.
|
|
|
|
<p><div class = "subheading">4.8.24 water</div>
|
|
Assigns to the texture the game properties for water.
|
|
<p align = "center"><a href = "../ch02/pg2_1.htm">Back</a> | <a href = "../index.htm">Home</a> | <a href = "../ch04/pg4_1.htm">Next</a>
|
|
|
|
</body>
|
|
</html> |