Displacement Map Terrain Editor Help

Getting started

  1. Load a displacement TGA and, optionally, its full-terrain texture.
  2. Set terrain width and height scale. The supplied Valley Ride terrain starts at width 256 and height 25.
  3. Inspect the terrain in 3D and drop route markers with M.
  4. Add or import track points in the 2D overview, then adjust the procedural controls.
  5. Inspect the live result before using Bake track.

Flight controls

Mouse
Look around after clicking the terrain. Once flying over the terrain, left-click drops a route marker.
W A S D
Move forward, left, backward, and right.
Q / E
Move down and up during free flight.
Shift / Alt
Fast and precision movement.
Mouse wheel
Change flight speed.
G
Toggle ground-following flight.
M
Drop a route marker at the camera's ground position.
T
Hide or restore the main tools.
O
Hide or restore the displacement-map overview.
H
Hide or restore camera telemetry.
I
Hide or restore the flight-instruction bubble.
P
Capture the current editor display as a PNG.
Esc
Release the mouse.

Terrain and display

The displacement map's green channel supplies elevation. The texture control loads a complete terrain texture; Inspection grass temporarily replaces it, and Restore texture switches back.

Textured, height-color, slope, untextured, and displacement-grid views provide different ways to judge the terrain. Lighting brightness changes inspection lighting without changing the source texture.

The permanent HUD reports precise camera X, Y, and Z coordinates, ground elevation, height above ground, yaw, pitch, field of view, and frame rate. These values can be used to reproduce a preferred starting view.

Ground view smoothly moves to the current ground position or, when outside the terrain, to the nearest edge or corner. Normal flight input cancels the transition.

Supported files and resolutions

The editor currently imports uncompressed or RLE-compressed TGA images in 8-bit grayscale, 24-bit true-color, or 32-bit true-color format. Displacement elevation is read from the green channel. Saved displacement maps are uncompressed 24-bit grayscale TGAs with the same value written to all three color channels.

The supplied MCM1 terrain uses a 257×257 displacement map, representing 256×256 terrain cells, with a 960×960 terrain texture. The current beta accepts any square TGA terrain texture from 1×1 through 2048×2048 and retains its exact imported dimensions. The texture does not need to match the displacement-map resolution, so sizes such as 960×960, 1016×1016, and 1920×1920 map across the complete terrain without being resized.

The current renderer builds the terrain as one mesh, so larger displacement maps may require substantially more memory and processing time. The 257×257 displacement and 960×960 texture combination remains the presently tested beta target.

Planned support includes 145×145 legacy displacement maps, 513×513 MCM2 displacement maps, and later custom formats around 1024 and 2048 samples as their exact requirements are confirmed. Future import work will add common indexed and true-color BMP terrain textures plus MCM2 16-bit displacement maps whose red and green channels combine into one height value. Efficient editing at larger displacement resolutions will require chunked mesh updates, visibility culling, background processing, and region-based history.

2D track editing

Route-marker safety

Markers can only be dropped while the camera is over the terrain. Out-of-bounds and duplicate markers are rejected instead of being clamped to a corner. Undo last marker removes the most recently dropped marker before it is converted into a path.

Elevation modes

Follow terrain

The centerline samples the original terrain continuously. Grade smoothing is a radius measured in displacement pixels: 0 follows every sampled change, while larger values bridge small rises and dips and therefore create more cut and fill. Start at 2 and increase it deliberately.

Elevation anchors

Selected points can carry explicit world-height anchors. The editor interpolates a profile through those anchors.

Fixed elevation

Creates a level centerline at the specified world height, useful for pads and special sections.

Preview, revert, and bake

Live preview always derives the procedural corridor from the preserved source heightfield. Revert preview disables terrain deformation while retaining the path. Bake track makes the preview the new working heightfield and clears the procedural path.

Important: general undo and redo are not implemented yet. A baked track, cleared path, or removed point cannot currently be restored with Cmd/Ctrl+Z. Keep the path procedural until you are satisfied.

Saving beta work

Save displacement TGA downloads the terrain currently visible in 3D, including an enabled procedural preview even if it has not been baked. Heights are exported as a 24-bit grayscale TGA at the imported dimensions, with the height copied into all three color channels.

Save path downloads a JSON file containing the spline, route markers, terrain scale, elevation mode, widths, smoothing, crown, camber, anchors, and berms. Load path restores those settings and calculates the terrain and full-resolution texture preview. Normalized point positions allow a path to scale to a differently sized displacement map; the editor reports when this occurs.

Each successfully saved or loaded path is also copied into browser recovery storage. After refreshing, Recover last path restores that copy. The downloaded JSON remains the durable, portable save file.

The browser warns before closing or refreshing when path or baked-terrain changes have not been saved. Texture images are not embedded in path files.

Screen capture

Capture PNG or P captures the complete current editor display, including the WebGL terrain and any visible tools, overview, telemetry, and flight instructions. Use T, O, H, and I to choose the desired combination first.

Chrome opens a sharing picker because the capture includes live webpage overlays. Choose This Tab to exclude Chrome's tabs, address bar, and window frame. The capture stream stops immediately after one PNG is saved. Screen capture requires HTTPS or a localhost address.