# Terraform Users Guide

Terraform Users Guide
v&tfversion
&docownerFirst
&docownerLast

&docownermail

&wwwterraform

April 7, 2000

This is the user's guide for terraform, an interactive digital terran generator/modeller.

## An Guide to the different Views

The different views/projections themselves should be self-explanatory. The "Fast Wireframe" thing might not be so, here's a short explanation: The default views all operate on the height field data directly and are designed to give good quality previews. When you select the "Fast Wireframe" option, terraform builds an index of the actual triangles making up your height field at the given resolution. This makes redrawing much faster, making it possible that you can rotate this preview by clicking and dragging your mouse.

When you're in "Fast Wireframe" mode, the 2DPlane, 3DHeight and 3DLight views will be shown unaltered while the 3DWire view will switch to the fast wireframe mode.

Generally, the height fields are much more fractal/rough than you would think from looking at the wireframe. The Wireframe view modes are really just an approximation of the general terrain type. The "Grayscale" colormap with "3D Light" view is the view type which best shows the terrain roughness. Export a few height fields to PovRay to get a feel for this.

## Rendering

Terraform is designed to be flexible and allow the use of different rendering options. Currently terraform supports POVRay and OpenGL. More about these below ...

### The Render Options Dialog

Choose the menu `HF-RenderOptions` to acces the render options dialog. This dialog allows you to set certain basic scene settings and choose the type of output (POVRay or OpenGL).

### Rendering in POVRay

Choose the menu `File-Export-POVRay` to render the current height field to POVRay directly. This will use the settings from the render options dialog to render the terrain in POVRay. This is still a bit rough but quite usable.

### Rendering in OpenGL

Choose the menu `File-Export-OpenGL` to render the current height field to OpenGL directly. This will use the settings from the render options dialog to render the terrain using the OpenGL API. Currently this only displays the landscape in a shade of red; hopefully this will improve in the future.

## Interactive Height Field Transformations

This section covers the different transformations which support a real-time preview.

### Craters

Place the specified number of craters on the height field using the specified parameters. This is a slightly modified version of John Beale's hf-lab crater routines. On the crater dialog, if you reduce the number of craters to 1, you can specify the exact locaton of the crater.

### Connect

This is the level connetor plug-in as used in the MS Windows terrain editor leveller.

### Fill

Fill the terrain object up to the specified elevation, using using the tightness parameter to determine how much the altered points are allowed to deviate from the specified elevation. Per default, all the points beneath the fill level are altered. If you chose to "Keep zero elevation" values, points with an elevation of zero (typically there is just one such point) will remain unaltered. This is relevant since filling is followed by a rescale.

### Fold

The 'fold' option allows you to create a margin at the edge of the height field which is submerged below the current sealevel. This is useful to force (a generated) height field to be integratable into a scene with a predictable horizon or sealevel and is probably best used in small multiple steps.

### Gaussian Hill

This creates a gaussian hill at the specified location with the specified parameters. You can use the 1st and 2nd mouse button to set the location parameters.

### Linear Scale

Picks a point and scales the surrounding terrain in a circular maner. Can be used to make all sorts of circular shapes. Still needs some work.

### Mirror

Mirror the height field along one of four axis. Horizontal (-), vertical (|), top-left bottom-right (\) or bottom-left top-right (/). This is useful for leaving the general characteristics of the landscape intact while changing it's layout.

### Rotate

Rotate the height field in increments of 90 degrees.

### Roughen/Smooth

Use neighbour-averaging to roughen or smooth the height field. The factor determines how much of the computed roughening is actually applied to the height field. In it's default invocation, the 4 directly neighbouring squares are used to calculate the roughening. If you select big sampling grid, all 8 neighbouring cells will be used.

### Terrace

Divide the terrain object into n specified levels with the specified closeness factor.

### Tile

Make the current height field tilable. Still needs some work.

### Transform

Transform applies a power transformation to the current height field such that height=pow(height,factor). You can choose to invert the power factor before applying it and wether you wish to also transform the current sealevel.

## Non-Interactive Height Field Transformations

This section covers the differnt transformations which don't have a real-time preview.

### Clone

Make a copy of the current Height Field and show it in a new window.

### Contour Line Map

Make a map of adjacent points within certain elevation bands using a selective flood-fill algorithm. By thinning the bands, you can approximate the Isograms (contour lines) which you can see on a real map. STILL NEEDS SOME WORK

### Erode

This routine calculates the flowmap and the uses the flowmap to erode the terrain, refreshing the flowmap at regular intervals (thus trading accuracy for speed). This is a lot faster than John Beale's code, but needs some more work.

### Flowmap

Calculate the flowmap of the current height field (see code for details). You can choose between the Single-Flow-Direction algorithm (which is reasonably fast) or the Multiple-Flow-Direction algorithm (which is pretty damn slow). On my machine (AMD K6-233) SFD takes about 2.5 seconds, while MFD takes around 30 minutes for a 400x400 height field.

### Invert

Inverts the current height field, leaves the waterlevel unchanged.

### Place POV Objects

Allows you to place a specified PovRay object on your landscape and write a corresponding POV include file. THIS CURRENTLY IS BROKEN.

### Rescale

Allows you to either double or half the size of the current height field.

### Render Options

The Render Options dialogue allows you set various scene parameters, such as lighthing position, camera position, object placement and atmospheric attributes prior to rendering the scene.