Entity Keys and Values

Once you’ve created the func_group that will become the terrain entity, you need to add the various keys and key values that make it a terrain entity.

A word to the wise:

WRITE YOUR KEYS AND VALUES ON SOMETHING YOU CAN EASILY REFER TO DURING DEVELOPMENT!! During the creation, testing and tweaking of the heightmap, you will have to reenter these key/value pairs for the terrain entity every time you recreate it. One thing that can make things easier is before replacing the terrain entity with a new mesh, open the entity window and click on the most complicated of the key/value pairs (usually the alphamap). When the new terrain func_group is in place, click on the value line and hit return. That’s one less thing to retype.

Key: Alphamap

Value:

The value should be the pathname to the art file use to assign textures to the terrain. Example: maps/alpha/pj_terra1.bmp. The pathname begins in the game (baseq3 or missionpack) directory, which includes the name of the art file.

The q3map compiler applies and blends the textures (shaders) on the terrain entity using a “metashader” (see Texturing the Terrain below) that references the art file named by the alphamap value. See the Creating the Alphamap section below for details.

Key: Layers

Value:

A positive integer, equal to the number of unique or root textures to be blended on the map. Each color on the alphamap’s palette corresponds to a “layer.” If you plan to blend 4 textures, you need a layer value of 4.

Key: Shader

Value:

A pathname, beginning in the missionpack/scripts directory, which includes the name of the filename and the name of the metashader. Example: The shader value for mpterra2 is “terrain/mpterra2”. “terrain” is the name of the script and mpterra2 is the name of the metashader used to apply texture to this terrain.

Key: Terrain

Value:

Set this to 1 to indicate that the func_group is a terrain entity. It’s essentially a yes/no flag.

Key: Min

Value:

Map coordinates of the minimum XY extents (lowest left extent) of a component piece of a multi-part terrain entity. This is optional, only used if you are texturing a subset of the total terrain area.

The Min and Max extents (both must be in the entity) establish where a subsection of terrain fits into the overall terrain map. It lets q3map assign a subset of the alphamap to the entity, instead of referencing the entire alphamap. It could also be used on a separate terrain entity to use the same alphamap, but reference a different shader.

Key: Max

Value:

Map coordinates of the maximum XY extents (uppermost right extent) of a component piece of a multi-part terrain entity. This is optional, only used if you are texturing a subset of the total terrain area.

The Min and Max extents (both must be in the entity) establish where a subsection of terrain fits into the overall terrain map. It lets q3map assign a subset of the alphamap to the entity, instead of referencing the entire alphamap. It could also be used on a separate terrain entity to use the same alphamap, but reference a different shader.

Back - Table of Contents - Creating the Alphamap

-15-