---
title: "geofx: Terrain for your game from plain words"
description: "Generate game terrain images for height, water flow and ground materials from plain words, ready for Godot, Unity, Unreal and three.js."
canonical: https://appliedmanifold.com/modules/geofx/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Modules](https://appliedmanifold.com/modules/)
3.  geofx

# Terrain for your game from plain words

Ask your AI agent for hills, valleys or riverbeds and get image files ready for Godot, Unity, Unreal or three.js. Preview a tile for $0.50.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys)[Read the docs →](https://appliedmanifold.com/docs/geofx/)

[Learn](https://appliedmanifold.com/learn/)[Examples](https://appliedmanifold.com/docs/geofx/examples/)

## Cut runoff channels into a sandstone pass

![Branching gullies along the sandstone cliffs at Ochre Pass](/showcase/geofx/ochre_pass_1600.webp)

At Ochre Pass, the gully filter draws branching channels along the sandstone slopes. The material map puts silt in the wet channels and caprock on the high bluffs.

![Height, material weights and wetness maps of Ochre Pass](/showcase/geofx/terrain_layers_1600.webp)

Height, material weights and wetness, from left to right.

[Open the terrain spec in Playground](https://appliedmanifold.com/playground/?module=geofx&cookbook=ochre_pass)

## Ridges cast moving shadows as the sun crosses the sky

Ridges shade valleys as the sun moves, in your own engine material.

 Shadows off Shadows on

![Ochre Pass at sunrise with horizon shading off](/showcase/shadow/low_sun_off_1600.webp)![The same sunrise with ridges casting shadows](/showcase/shadow/sunrise_1600.webp)

![Ochre Pass at sunrise](/showcase/shadow/sunrise_1600.webp)

Sunrise

![Ochre Pass at noon](/showcase/shadow/noon_1600.webp)

Noon

![Ochre Pass at sunset](/showcase/shadow/sunset_1600.webp)

Sunset

[Use terrain shadows in a material →](https://appliedmanifold.com/docs/geofx/shadows/)

## Build and shade the hills terrain

**hills.geo.toml**

![Shaded relief of the hills ground, compiled with Spatial Compiler](/compiled/hills/panel-0.webp)

Compiled with Spatial Compiler. [Open in Playground](https://appliedmanifold.com/playground/?module=geofx&cookbook=hills&spec=02df476f007c38c3f323708927fb4df98cdf86b3ba3f83bd661881b1a5be277e) · [Report](https://appliedmanifold.com/compiled/hills/report.json) · [Full contact sheet](https://appliedmanifold.com/compiled/hills/contact.webp)

The hills example covers 512 m, with a road, a flat site and a hollow. Choose a map or a perspective view.

## Craters that vary by the ground

Each material can crater as a named ground type, so a blast in sand does not match one in rock. Crater shading darkens a bowl's floor under a high sun. You can export soil and strata layers for a simulation.

Every ground compile now has a new spec hash, even when the images stay the same. A cache keyed only on the spec hash must be compiled again or given a new key once.

[Set crater, soil and strata controls →](https://appliedmanifold.com/docs/geofx/spec/#craters)

## Multi-tile worlds and custom elevation maps

-   [![world\_2x2, compiled with Spatial Compiler](/compiled/world_2x2/thumb.webp)world\_2x2](https://appliedmanifold.com/compiled/world_2x2/contact.webp)
-   [![district\_fixed, compiled with Spatial Compiler](/compiled/district_fixed/thumb.webp)district\_fixed](https://appliedmanifold.com/compiled/district_fixed/contact.webp)

Compile matching terrain tiles with `world_2x2` or make surface maps from existing elevation data with `district_fixed`.

## Load maps into Godot 4

geofx includes height and material sampling functions, a loader script and lossless import files so you can bind the maps to a terrain shader.

-   `godot/hills_ground.gdshaderinc`
-   `godot/hills_ground.gd`
-   `godot/hills_ground_demo.gdshader`
-   `../hills_demo.tscn`
-   `godot/hills_height.png.import`
-   `godot/hills_masks0.png.import`
-   `godot/hills_masks1.png.import`
-   `godot/hills_material_id.png.import`
-   `godot/hills_material_w0.png.import`
-   `godot/hills_material_w1.png.import`
-   `godot/hills_normal.png.import`

[geofx in Godot 4 →](https://appliedmanifold.com/docs/geofx/godot/)

## Questions

### What maps does a geofx compile produce for terrain?

geofx outputs height, normal, material ID, material weight, wetness, flow, slope and physical maps along with a layout JSON file.

### Can geofx process existing elevation data or multiple terrain tiles?

Yes, geofx can generate surface maps from an existing heightmap and compile matching multi tile worlds from a terrain recipe.

### What Godot files does a geofx job include?

A geofx job includes a terrain loader script, shader include, demo scene and lossless PNG import settings for Godot.
