Vera Visions Material Manual


4 VMAP Specific Material 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 material.

4.1 vmap_tessSize <amount>

The vmap_tessSize keyword 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 manipulated by a vertex shader program. Abuse of this can create a huge number of triangles. This happens during VMAP 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 are large, and thus, less costly in terms of triangles created.

4.2 vmap_backshader <materialname>

This allows a brush to use a different material 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.

4.3 vmap_globaltexture

Many problems with getting material effects to work across multiple adjacent brushes are a result of the way VMAP 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.

4.4 vmap_sun <red> <green> <blue> <intensity> <degrees> <elevation> <deviance> <samples>

This keyword in a sky material 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 VMAP.

<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.
<deviance> is the number of degrees for the half-shadow. General values up to 2 or 3 are acceptable. The real sun has a solid angle of about half a degree.
<samples> is the number of random jitters distributed over the solid arc (~16).

DESIGN NOTE: Sky materials should probably still have a vmap_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 vmap_sun value and a higher vmap_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 level 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 material.

4.5 vmap_surfaceLight <light value>

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.

4.6 vmap_lightimage <texturepath/texturename>

The keyword vmap_lightimage generates lighting from the average color of the TGA image specified by the vmap_lightimage.

The keyword sequence for generating light on a vmap_surfacelight should be ordered as follows:

  1. vmap_lightimage ; (the texture providing the light and the color of the light)
  2. qer_editorimage ; (the editor-only image used to select the source map for the texture)
  3. the average color of the light emitted from the material is calculated from the lightimage.)

The reason vmap_lightimage 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.

Example: Taking light from another source texture

// Vera Visions Material
{
	// base TGA (used because the material is used with several
	// different light values
	diffusemap textures/gothic_light/ironcrosslt2.tga

	// this TGA is the source for the color of the blended light
	vmap_lightimage textures/gothic_light/ironcrosslt2.blend.tga

	// emitted light value of 10,000
	vmap_surfacelight 10000

	{
		program lightmapped
		map $diffusemap
	}
	{
		program unlit
		map textures/gothic_light/ironcrosslt2.tga
		blendFunc filter
	}
	{
		program unlit
		map textures/gothic_light/ironcrosslt2.blend.tga
		blendFunc add
	}
}

4.7 vmap_lightsubdivide <value>

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 VMAP lighting.

4.8 surfaceparm <parm>

The surfaceparm keyword is not only read by the VMAP compiler, but also by the renderer. A few keywords will only apply to any one of them.

All surfaceparm keywords are preceded by the word surfaceparm as follows: surfaceparm fog or surfaceparm noimpact.

4.8.1 alphashadow
This keyword applied to a texture on a brush, patch or model will cause the lighting phase of the VMAP 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.

4.8.2 areaportal
A brush marked with this keyword functions as an area portal, a break in the VMAP 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 areaportal.

4.8.3 clusterportal
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.

4.8.4 donotenter
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.

4.8.5 fog
Fog defines the brush as being a "fog" brush. This is a VMAP function that chops and identifies all geometry inside the brush. The General material keyword fogparms must also be specified to tell how to draw the fog.

4.8.6 lava
Assigns to the texture the game properties set for lava. This affects both the surface and the content of a brush.

4.8.7 lightfilter
Causes the VMAP light stage to use the texture's RGB and alpha channels to generate colored alpha shadows in the lightmap. For example, this can be used to create the colored light effect cast by stained glass windows. This can be used with surfaceparm alphashadow if an alpha is to be respected.

4.8.8 nodamage
The player takes no damage if he falls onto a texture with this surfaceparm

4.8.9 nodlight
Read as "No DeeLight". A texture containing this parameter will not be affected or lit by dynamic lights, such as weapon effects. The VMAP compiler doesn't really care about this, but the renderer does.

4.8.10 nodraw
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. Light will pass through it, therefore beware of bleeding issues when using nodraw/caulk textures with this.

4.8.11 nodraw2
Same as nodraw, but the engine won't draw it, whereas the VMAP compiler will react to the surface. So unlike nodraw, light will not pass through these surfaces.

4.8.12 noimpact
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.

4.8.13 nomarks
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.

4.8.14 nolightmap
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.

4.8.15 nosteps
The player makes no sound when walking on this texture.

4.8.16 nonsolid
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.

4.8.17 origin
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.

4.8.18 playerclip
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.

4.8.19 slick
This surfaceparm included in a texture should give it significantly reduced friction.

4.8.20 slime
Assigns to the texture the game properties for slime. This affects both the surface and the content of a brush.

4.8.21 structural
This surface attribute causes a brush to be seen by the VMAP process as a possible break-point in a BSP tree. It is used as a part of the material 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.

4.8.22 trans
Light will pass through this surface, but only if neither alphashadow or lightfilter are applied. Tells VMAP that pre-computed visibility should not be blocked by this surface. Generally, any materials that have blendfuncs should be marked as surfaceparm trans.

4.8.23 water
Assigns to the texture the game properties for water.

4.8.24 climb
Marks the desired surface as a climbable surface. This currently affects the entire volume.

4.8.25 vehicleclip
Blocks all movement of vehicle entities through this surface.

4.8.26 leakssteam
When this surface is impacted, steam will leak out temporarily. Specific to The Wastes 1.3.

4.8.27 leakswater
When this surface is impacted, water will leak out temporarily. Specific to The Wastes 1.3.

4.8.28 alien
Defines that the surface is of an 'alien' material. Affects impact sound and effects.

4.8.29 flesh
Defines that the surface is of flesh. Affects impact sound and effects.

4.8.30 foliage
Defines that the surface is foliage. Affects impact sound and effects.

4.8.31 computer
Defines that the surface is of computer parts. Affects impact sound and effects.

4.8.32 dirt
Defines that the surface is of dirt. Affects impact sound and effects.

4.8.33 vent
Defines that the surface is a vent. Affects impact sound and effects.

4.8.34 grate
Defines that the surface is a grate. Affects impact sound and effects.

4.8.35 metal
Defines that the surface is of metal. Affects impact sound and effects.

4.8.36 glass
Defines that the surface is of glass. Affects impact sound and effects.

4.8.37 sand
Defines that the surface is of sand. Affects impact sound and effects.

4.8.38 slosh
Defines that the surface is of a liquid. Affects impact sound and effects.

4.8.39 snow
Defines that the surface is of snow. Affects impact sound and effects.

4.8.40 tile
Defines that the surface is of kitchen/bathroom tiles. Affects impact sound and effects.

4.8.41 wood
Defines that the surface is of wood. Affects impact sound and effects.

4.8.42 concrete
Defines that the surface is of concrete. Affects impact sound and effects.

4.8.43 fl_r1
Reserved for custom games. This can be anything.

4.8.44 fl_r2
Reserved for custom games. This can be anything.

4.8.45 fl_r3
Reserved for custom games. This can be anything.

4.8.46 fl_r4
Reserved for custom games. This can be anything.

4.8.47 fl_r5
Reserved for custom games. This can be anything.

4.8.48 fl_r6
Reserved for custom games. This can be anything.

4.8.49 fl_r7
Reserved for custom games. This can be anything.

Back | Home | Next