mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-12-02 00:22:01 +00:00
8037810110
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@177 8a3a26a2-13c4-0310-b231-cf6edde360e5
174 lines
10 KiB
HTML
174 lines
10 KiB
HTML
<html>
|
||
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
|
||
<meta name="ProgId" content="FrontPage.Editor.Document">
|
||
<title>Height Maps</title>
|
||
</head>
|
||
|
||
<body background="../pics/background.jpg" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
|
||
|
||
<b>
|
||
<p align="center"><font size="5">Height Maps</font></p>
|
||
<div align="right">
|
||
<table border="1" cellspacing="1" width="100%" bordercolor="#808080" bgcolor="#000000" cellpadding="10">
|
||
<tr>
|
||
<td width="100%"><font FACE="Times New Roman">
|
||
<p> The terrain maps in Quake III: Team Arena began as grayscale bitmap art files
|
||
imported into David Hyde’s “<i>GenSurf</i>” tool, a Q3Radiant plug-in. As
|
||
mentioned before, the height map is a template that the utility uses to define
|
||
the vertex heights of the triangles forming the terrain surface. We used <i> Adobe
|
||
Photoshop</i> and <i> JASC’s Paint Shop Pro</i> to create and adjust our height maps …
|
||
but any art program that can output a .bmp format file can be used to create the
|
||
height map.</p>
|
||
</font><font FACE="Times New Roman" SIZE="2">
|
||
<p><img SRC="Image3.gif" WIDTH="264" HEIGHT="350" align="left"></p>
|
||
</font><font FACE="Times New Roman">
|
||
<p>figure 1.</p>
|
||
<p> By way of example, the piece of artwork in figure 1 is a greatly scaled up
|
||
(4X) version of the height map used to create the initial terrain geometry for
|
||
mpterra2. The very dark, horizontal area near the center is the big “lake”
|
||
near the center of the map. The dark curves to the upper right and lower left
|
||
are the “fjord” water areas. The dark areas in the upper left and lower
|
||
right are the locations of the bases. The white and very light gray areas
|
||
represent the peaks of hills and mountains.</p>
|
||
<p> The key to understanding how the height map works is that the shades of gray
|
||
in the art (call them “color values”) represent the height of mesh vertexes
|
||
(triangle corners) and not the triangle quads (squares created by two
|
||
triangles). When you work on a piece of art where each individual pixel
|
||
corresponds to a vertex, it is easy to imagine the pixels (usually large square
|
||
blocks) as squares of terrain. But that’s not how it works.</p>
|
||
<p> Start by giving some thought to the eventual size and proportions of the
|
||
final terrain area in your map. How many rows and columns of triangles do you
|
||
want in the map? The finer you subdivide the map (making more rows and columns),
|
||
the more triangles will appear in any given view, but the terrain can be made
|
||
less blocky by including more.</p>
|
||
<p> GenSurf can generate a terrain mesh of up to 64 triangles on a side (of the X
|
||
and Y dimensions of the entire mesh). If you don’t decimate the GenSurf output
|
||
(an option that optimizes and reduces the number of triangles used to create the
|
||
mesh … and we really recommend that you don’t), it generates a mesh of
|
||
triangles in arranged in quads in neat rows and columns. By way of reference,
|
||
mpterra2 (the largest Team Arena map) is “only” 48x64 columns and rows of
|
||
triangles. Since Q3Radiant and q3map tend to like things that end up in neat
|
||
powers of 2 or units of 64 subdivisions, consider having your map extents (lower
|
||
left and upper right map corners) fall onto neat units, power of 2 units. In
|
||
mpterra2, the extents were set up to make the mesh triangles have sides of 256
|
||
units.</p>
|
||
</font><font FACE="Times New Roman" SIZE="2">
|
||
<p><img SRC="Image4.gif" WIDTH="103" HEIGHT="99" align="left"></p>
|
||
</font><font FACE="Times New Roman">
|
||
<p>Figure 2.</p>
|
||
<p> Figure 2 shows an example of a top view of a terrain mesh that is 8 x 8 rows
|
||
and colums of triangles (on a side).</p>
|
||
<p> Just as you would plan out a game map, give thought to the layout and flow of
|
||
your terrain map. Will it be all-open in one view? Can you use natural terrain
|
||
features to block vis? How complicated will your buildings (if any) be? Do you
|
||
want to include trees, water, weather effects or other items that could add to
|
||
the visual cost of your map?</p>
|
||
<p> Begin the creation of your height map by making a new grayscale file. If your
|
||
program doesn’t allow you to easily modify a .bmp format file, work in another
|
||
format and then convert it when you save. You can make the dimensions of your
|
||
height map art whatever you want. The extents you set in GenSurf for the map
|
||
dimensions are what determine the final size of the terrain piece. Some may find
|
||
it easier to work with a large file initially, using their favorite painting
|
||
tools to lay in the shades of gray.</p>
|
||
<p> However, when you get down to making final and precise changes in your height
|
||
map you should (and this is STRONGLY recommended), change the size of the art
|
||
file such that the pixel dimensions of the map are 1 pixel larger than the
|
||
number of divisions (rows and columns) in the terrain mesh you want to create.
|
||
If you are making a 64 x 64 division map, then you want to create a 65 x 65
|
||
pixel height map.</p>
|
||
<p> If there is not a one-to-one match between the number of vertexes in the mesh
|
||
(one more than the number of divisions) and the number of pixels in the height
|
||
map, then GenSurf interpolates the number values (0 to 255 range) of the pixels
|
||
to get an averaged value instead of an exact value for the height of the vertex
|
||
at that point.</p>
|
||
<p> When you save out the height map art file, you must save it in 8-bit .BMP
|
||
format. Currently, this is the only the file format that GenSurf recognizes.</p>
|
||
<b>
|
||
<p>Tips and things to consider for making Height Maps</p>
|
||
<blockquote>
|
||
<blockquote>
|
||
</b></font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Read through the section on blocking
|
||
vis later in the document. Plan your vis blocking terrain structures in advance
|
||
instead of having to start over when you discover that too much of your world is
|
||
in view.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Consider what type of geometry will
|
||
form the edges of your map. The terrain maps in Q3:TA resolve the issue by
|
||
creating canyon-like settings … valleys bordered by high canyon or mountain
|
||
walls.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Start by filling your map with a
|
||
neutral gray (value 127 or 128). Paint the high areas lighter and the low areas
|
||
darker.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Keep your terrain shapes simple when
|
||
you start. You can add greater complexity as your map develops.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">You will probably want to keep the “playable”
|
||
area of your map within a fairly close or “narrow” range of gray values
|
||
close to the middle range of values. This allows you to use very dark shades of
|
||
gray to create deep chasms and very light shades of gray to create high
|
||
mountains, canyon walls or visual barriers.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Extreme jumps between the gray values
|
||
in adjacent areas means steep slopes.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Avoid making vertical or near vertical
|
||
terrain surfaces … unless you don’t mind the resulting textured surface
|
||
looking like barcode. Q3Map planar projects the textures onto the terrain entity’s
|
||
surface (Normal brushes are box mapped). The pixels will stretch and stretch to
|
||
fill the space. The farther the surface is from horizontal, the greater the
|
||
stretching.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Use the roughness feature of GenSurf
|
||
to add a little, um … roughness to your map … so flat areas aren’t
|
||
completely flat. If you are using a 1 to 1 scale height map, adding “noise”
|
||
to the file will also accomplish this.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">If you want an area, such as a path,
|
||
to be flat, you need to make the gray value affecting two adjacent vertexes the
|
||
same value.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">You can create gentle slopes by
|
||
changing the gray values between adjacent areas by very small amounts.</p>
|
||
</font><font FACE="Symbol">
|
||
<p>· </font><font FACE="Times New Roman">Slopes greater than 45 degrees are
|
||
close to becoming unplayable barriers.</p>
|
||
<p> </p>
|
||
</blockquote>
|
||
</blockquote>
|
||
<p>If you are building a symmetrical team style map, only create one side of the
|
||
terrain. Create a new piece of art that has the dimensions of the final piece.
|
||
Paste the map half into the new file and move it into position. If the map will
|
||
have an even number of vertexes, paste the map again and then rotate or mirror
|
||
(as you choose) the selection and move it into position. If the number of
|
||
vertexes is odd, after you paste the first half of the map, select all but the
|
||
row or column of pixels along which the two halves of the map will face and copy
|
||
it. Paste it, rotate or mirror it, then position it. Now, select and copy half
|
||
the row or column of pixels you didn’t copy in the last operation. Paste it,
|
||
transform it as you did in the last operation, and then position it so that it
|
||
is in the same row or column, but on the opposite side of the piece you copied.</p>
|
||
<p>When you make significant changes to a height map, consider saving it as
|
||
version rather than over-writing the older file. Always nice to have a back up
|
||
when you realize that you’ve messed up more than you’ve fixed.</p>
|
||
</font>
|
||
|
||
<p align="center"><a href="creating_the_terrain.html">Back</a> - <a href="table_of_contents.html">Table
|
||
of Contents</a> - <a href="other_possible_height_map_tools.html">Other Height
|
||
Map Tools</a></p>
|
||
|
||
<p> </td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</b>
|
||
<p align="center"> </p>
|
||
<p align="center">-8-</p>
|
||
|
||
</body>
|
||
|
||
</html>
|