---
title: "geofx docs: terrain heightmaps and material maps"
description: "Compile a .geo.toml terrain recipe into 16 bit heightmaps, normal maps and material weight maps, then load them in Godot, Unity, Unreal or three.js."
canonical: https://appliedmanifold.com/docs/geofx/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

[Home](https://appliedmanifold.com/) / [Docs](https://appliedmanifold.com/docs/) / geofx

# geofx docs Available

Shape hills, valleys and rivers from a `.geo.toml` recipe to build terrain surfaces with matching soil, rock and wetness.

geofx runs on the hosted API: try it in the [Playground](https://appliedmanifold.com/playground/?module=geofx&cookbook=river_bend).

## Output files

For the Hills example, height is written to `godot/hills_height.r16` and normals to `godot/hills_normal.png`. Material weight PNGs and `layout.json` guide how terrain layers map in your scene. You can also export soil and strata layers for a simulation. Every geofx bake now has a new spec hash, even when the images stay the same. A cache keyed only on the spec hash must be rebaked or re-keyed once.

[![A winding riverbed runs between limestone ridges.](https://appliedmanifold.com/showcase/hosted/ground/hero_1600.webp)

River bend](https://appliedmanifold.com/playground/?module=geofx&cookbook=river_bend)

## Estimate and bake

First call MCP `estimate` with the request payload and check the quoted price. If approval is required and the user agrees, include the returned `quote.id` as `accept_quote` in `submit`, or use `POST /v1/estimate` then `POST /v1/jobs` over REST with the same approval flow.

ridge.geo.toml [Open in Playground](https://appliedmanifold.com/playground/?module=geofx&cookbook=ridge&spec=b9ea561ccdab717e9167bdc91d25f09ea6e71e44fb523ceab3c833bcae749b07)

```
[meta]
name = "ridge"
seed = 42

[grid]
size_m = [512, 512]
cell_m = 1.0

[[shape]]
op = "ridged"
amplitude_m = 40
scale_m = 320
octaves = 7
```

### MCP request

JSON [Open in Playground](https://appliedmanifold.com/playground/?module=geofx&cookbook=ridge&spec=b9ea561ccdab717e9167bdc91d25f09ea6e71e44fb523ceab3c833bcae749b07)

```json
{
  "module": "geofx",
  "operation": "bake",
  "quality": "draft",
  "spec": "[meta]\nname = \"ridge\"\nseed = 42\n\n[grid]\nsize_m = [512, 512]\ncell_m = 1.0\n\n[[shape]]\nop = \"ridged\"\namplitude_m = 40\nscale_m = 320\noctaves = 7\n"
}
```

## Engine import

| Engine | Import |
| --- | --- |
| Godot | Read `hills_height.r16` into a terrain mesh and bind the PNG maps to a shader using `layout.json`. |
| Unity | In Unity, normalize decoded geofx heights before passing them to `TerrainData.SetHeights`. Read channel names from `layout.json` and unpack the material weights from the PNG maps into alphamaps. |
| Unreal Engine | Import the height PNG into Landscape and bind unpacked weight layers using `layout.json` scales. |
| three.js | Load `hills_height.r16` into a vertex grid and bind the PNG maps to a shader material. |

## Reference and examples

-   [Examples](https://appliedmanifold.com/docs/geofx/examples/) Compile heightmaps, normal maps and material masks for River Bend and a hills tile to shade and displace terrain in your engine.
-   [Spec keys](https://appliedmanifold.com/docs/geofx/spec/) geofx spec keys, defaults and ranges come from the release schema. Set the erosion filter and amplification to cut channels along runoff paths.
-   [geofx in Godot](https://appliedmanifold.com/docs/geofx/godot/) geofx wire writes a shader include, a script and lossless import files for Godot 4. These are outputs from our compiled hills example.
-   [Errors](https://appliedmanifold.com/docs/geofx/errors/) geofx names invalid keys and missing inputs in its report. Exit code 5 means the compile finished but missed a budget limit.

## Questions

### Do ground bakes still have the same spec hash?

No. Every ground bake now has a new spec hash, even when the images stay the same. A cache keyed only on the spec hash must be rebaked or given a new key once. The hosted cache also keys on the program and the module version, so it only misses once. Fire and mesh hashes are unchanged.

### What output files does a geofx bake produce?

A geofx bake writes 16 bit heightmaps, normal maps, material weight PNGs and layout.json to guide terrain layers in your scene.

### How do I estimate and submit a geofx job?

Call MCP estimate with your payload first, then pass the returned quote.id as accept\_quote in submit if approval is required.

### How do engines import geofx height and material maps?

Godot and three.js read the raw height file into a mesh, Unity normalizes heights for TerrainData and Unreal imports the height PNG.
