mohaa-spearhead-sdk/docs/MOH Terrain Editing Manual.html
2003-02-06 00:00:00 +00:00

181 lines
No EOL
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<title>MOHAA - SDK</title>
</head>
<body>
<b><u><font size=+2><center>MOH Terrain System Reference Manual (January 13, 2001)</center></font></u></b>
<br>
<br>
<I><font size=+1>Creating Terrain</font></I>
<br>
<p>
1. Draw a brush. The terrain patches have a minimum area of 512x512 units, so drawing brushes larger than this will result in larger patches.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a) Go to the LOD Terrain menu. Select “Create from brush.” A terrain patch will appear in place of your original brush.<br>
<br>
2. To create larger tracts of land, and to build up from a smaller set of terrain patches, you can create multiple separate terrain patches, and then connect them. <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a) Create several terrain patches apart from each other. The clone key works with terrain patches the same as with brushes, so they can be copied quickly.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b) Select and drag one of the patches, and line up one of its sides with another patch. They should be perfectly lined up in the X-Y view, but they only need to be reasonably close in the Z plane. <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c) Release the dragged patch. If the patches are lined up within the attachment limits, you will get a small dialog:<br>
<br>
<center><img src="MOH Terrain Editing Manual/1-1.jpg"></center>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d) The first two options will force the edge vertices of one patch to meet up with the other. The third option is redundant, as hitting Cancel will do the same thing. Joining patches is essential there is no reason to have X-Y lined up patches sitting there unconnected!<br>
</p>
<br>
<I><font size=+1>Selecting Terrain</font></I>
<br>
<p>
1. Individual Patch Selection: CTRL-SHIFT-Left Click to select one 512x512 patch <br>
2. Multiple Patch Selection: Same as #1, repeat as required<br>
3. Full Mesh Selection: SHIFT-Left Click to select a whole connected mesh<br>
4. Vertex Mode: Select some terrain, press V to go to vertex mode<br>
5. Vertex Selection: In Vertex Mode, left click any vertex in 2D/3D windows<br>
6. Multiple Vertices: Drag over vertices in 2D, or CTRL-Left Click vertices<br>
7. Facet Selection: CTRL-SHIFT-Left click faces when in Facet Mode<br>
<br>
To disconnect terrain patches from a larger mesh of patches, select the individual patches you want to remove, and press SHIFT-X to separate the patches from the larger mesh. You can now delete the separated patches, or move them somewhere else and reattach them to another continuous mesh. <br>
</p>
<br>
<I><font size=+1>Manipulating Terrain Part I Area Manipulation</font></I>
<br>
<p>
1. To raise and lower the terrain over an area, the Area Filter is used. Press SHIFT-A to access the Area Filter dialog:<br>
<br>
<center><img src="MOH Terrain Editing Manual/1-2.jpg"></center><br>
<br>
2. The bulginess adjusts how sharply the terrain will slope, and the radius adjusts how many units away from any selected terrain vertices the terrain will be affected. <br>
3. Select a vertex or multiple vertices and drag them up or down to shape the terrain in the 2D or 3D preview windows. <br>
</p>
<br>
<I><font size=+1>Manipulating Terrain Part II Vertex Manipulation</font></I>
<br>
<p>
1. The vertex manipulation options are in the Move Terrain Vertices dialog. Bring this up by selecting some terrain vertices, and then pressing SHIFT-V. You must have some terrain vertices selected to bring up this dialog:<br>
<br>
<center><img src="MOH Terrain Editing Manual/1-3.jpg"></center><br>
<br>
2. The first four options adjust vertex heights of multiple vertices to a uniform elevation; highest means move all selected vertices to the same height as the highest one in the selection, and so on. Smooth is not very effective, and shifts the selected vertices in small increments towards the same result as the Move to Average option. Jitter randomizes the heights of the selected vertices in very small increments. <br>
3. Vertices can be frozen into place to avoid unwanted accidental editing changes in your terrain. To lock vertices, select the vertices you want to freeze/unfreeze, go to the LOD Terrain menu, and choose “Lock/Unlock Vertices.” Alternatively, use the Lock/Unlock Vertices toolbar button: <br>
<br>
<center><img src="MOH Terrain Editing Manual/1-4.jpg"></center><br>
</p>
<br>
<I><font size=+1>Manipulating Terrain Part III Grayscale Image (Height Fields)</font></I>
<br>
<i>Saving to Image</i><br>
<br>
<p>
1. Terrain can also be edited by painting a grayscale image a height field - in a paint program. The editor will export and import such images, and apply that information to any terrain in the level.<br>
2. To export existing terrain to a height field, terrain must first be selected. Go to the LOD Terrain menu and select “Save to Image.” Enter a filename and save the .TGA file. When this is done, a message will be printed in the editor console window, indicating the scale to which the image should be imported later on: <br>
<br>
<center><img src="MOH Terrain Editing Manual/1-5.jpg"></center><br>
<br>
<i>Loading from Image</i><br>
<br>
1. To import a .TGA, terrain must first be selected. Go to the LOD Terrain menu and select “Load from Image.” This will bring up the Load Terrain From Image dialog:<br>
<br>
<center><img src="MOH Terrain Editing Manual/1-6.jpg"></center><br>
<br>
2. To make the imported image translate correctly in the editor (ie: form the terrain at the correct scale), the Custom Blend Function is used. The Image Weight should be set to the scale factor number displayed in the console when the data was exported (see step 2 above.) Leave Existing Weight at 0. Click OK to commit. <br>
3. The first three options simply provide additional ways to interpret the imported data.<br>
<br>
</p>
<br>
<I><font size=+1>Manipulating Terrain Part IV Facet Manipulation</font></I>
<br>
<p>
1. Facet Manipulation is essential both for aesthetics and for reduced polygon counts. It provides direct control over the way any part of the terrain shifts through different levels of detail (LOD.) <br>
2. Press SHIFT-F to bring up the Edit Facet Flags dialog:<br>
<br>
<center><img src="MOH Terrain Editing Manual/1-7.jpg"></center><br>
<br>
3. You can only select facets (individual triangles of terrain) while the Edit Facet Flags dialog is active.<br>
4. To change the properties of the facet(s), select them, and then check the appropriate box. Click Done to exit the dialog.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a) Invisible The facet is invisible, but is still there. It can be collided with. It will not affect the LOD of any neighboring facets.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b) Delete The facet is removed completely. All neighboring facets will be rendered at maximum detail. This is good for removing terrain under buildings so that the terrain surrounding the building does not morph due to LOD at runtime and appear unusual.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c) Important The facet will LOD less aggressively to lower detail levels.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d) Trivial The facet will LOD more aggressively to lower detail levels.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e) Max Detail: The facet will never LOD to lower detail levels. More polygons.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f) No Detail: The facet will always LOD to lower detail levels. Less polygons.<br>
</p>
<br>
<I><font size=+1>Displaying Terrain </font></I>
<br>
<p>
1. LOD Terrain menu: Scale 1 through 4 reduces the number of triangles displayed in the editor, not in the game.<br>
2. CTRL-R will toggle the display of any terrain on/off. <br>
3. LOD Terrain menu: Shade will display the terrain as Gouraud-shaded<br>
4. CTRL-SHIFT-left/right square brackets ([, ]) will limit the distance to which the terrain is drawn when the Terrain Cubic Clip (restricts how much terrain is shown in the editor to enhance performance) button is active:<br>
<br>
<center><img src="MOH Terrain Editing Manual/1-8.jpg"></center><br>
</p>
<br>
<I><font size=+1>Limitations of the Terrain System</font></I>
<br>
<p>
1. The maximum allowable vertical elevation change between any vertices within a 512x512 terrain patch is just under 512 units.<br>
2. Terrain can only be formed initially on the X-Y plane.<br>
3. Any facet options such as Delete, which affect neighboring facets LOD severity, will also influence the LOD of facets further out; there is a minor propagation effect that takes place due to the LOD system. It takes some distance to go from a max detail (many small triangles) portion of terrain to back to normal or to low detail (larger triangles.) <br>
4. The facet flag for “Max LOD” makes the affected triangles draw at ter_maxlod = 6, which is the maximum setting. Even though the game defaults to ter_maxlod = 4, these affected triangles will go all the way to ter_maxlod = 6. <br>
5. The editor does not interpret and display facets as they are rendered in the actual game. (ie: LOD effects are not shown in the editor.) <br>
6. Terrain patches do not block VIS.<br>
7. The terrain system also has a max triangle count. If the map has no vis data this defaults to 32768; with vis it defaults to 8192. You can change this with ter_maxtris and a ter_restart (see Console Commands below.)<br>
</p>
<br>
<I><font size=+1>Console Commands </font></I>
<br>
<p>
<b>ter_minlod:</b> minimum LOD in the pre-tesselation stage, 0 - 6 (6 = max tesselation) -- requires ter_restart<br>
<br>
<b>ter_maxlod:</b> maximum LOD in the dynamic tesselation. Precalculated tesselation may exceed this.<br>
<br>
<b>ter_maxtris:</b> (integer) maximum triangles in the scene. The terrain system will not draw more triangles than this. Requires ter_restart. <br>
<br>
<b>ter_restart:</b> recalculates the base LOD, and adjusts the maxtris. Automatically happens with a vid_restart.<br>
<br>
<b>ter_crater:</b> creates a crater in the terrain, part of testing a deformable terrain system<br>
<br>
<b>ter_count:</b> (0/1) r_speeds for terrain <br>
<br>
<b>ter_geomorph:</b> (0/1) deactivates the LOD system all terrain is drawn at full detail<br>
<br>
<b>ter_error:</b> (0 to 10.0, 10.0 default) adjusts how aggressively the LOD system reduces terrain detail, ranges from 0 to 10.0. Less error = more detail sooner.<br>
<br>
<b>ter_lock:</b> (0/1) locks display of terrain, to show effects of view frustrum culling (any terrain not visible to the engine from the current viewpoint is removed to improve polygon counts)<br>
<br>
<b>ter_cull:</b> (0/1) disables the view frustrum culling; all terrain is drawn regardless of visibility<br>
</p>
</body>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>
<pre>
<i><font color=blue>
</font>
</i>
</pre>