Skip to content

From LibreTerrain to Godot ​

Level: intermediate · Time: 30 minutes

You'll add colour and vegetation to a terrain, build it, and import everything into Godot 4 with the LibreTerrain editor plugin.

Before you start: have a terrain to work with. The island from Draw an island or the Highlands example both work. You'll also need a Godot 4.6+ project.

1. Choose a build size the plugin can import ​

The Godot plugin bakes one vertex per sample and currently caps images at 4,194,304 samples, so use a build resolution of 2,049 or less. Set it in the Build tab.

2. Colour ​

  1. On your final terrain node, click → Colour. It arrives in the Colour tab as a portal.
  2. Add a Colourise with the Terrain preset for a base colour by altitude.
  3. Bring a Slope mask across and use Colour Layers to paint rock where it's steep.
  4. For engine texturing, feed your masks into a Splat Map.

INFO

The import helpers skip colour maps and 8-bit PNGs, and tell you so. Export splat maps as PNG 8 and assign them in your own Godot material. Masks exported as EXR or PNG 16 come through as float textures.

3. Vegetation ​

  1. Send the terrain (and a water mask, such as Sea's Sea) to the Vegetation tab.
  2. Add Trees, connect the terrain and water, and pick a Species preset.
  3. Add Grass and connect Trees' Occupied output to Grass' Occupied input.
  4. Toggle Plants in the viewport to see placeholder shapes.

4. Mark and build ​

  • Final Height: EXR.
  • Masks you want in Godot, such as the Slope or a vegetation Density: EXR.
  • Trees' Points: CSV.

Press Build. You get the images and CSV files, plus build.json.

5. Import into Godot ​

  1. Copy import-helpers/godot/addons/libreterrain_import/ from the LibreTerrain repository into your project's addons/ folder, and enable LibreTerrain build importer under Project → Project Settings → Plugins.
  2. Choose Project → Tools → Import LibreTerrain build…, select build.json, and choose a destination such as res://terrain/island.scn.
  3. Open the new scene. The terrain is one MeshInstance3D at 1 unit = 1 metre, centred on the origin.
  4. Select the root node and paste a mask's key (for example ["n_0012","out"]) into Preview Mask to see it on the terrain.
  5. Each tree species is a MultiMeshInstance3D with a placeholder cone. Replace its mesh with your tree at nominal size.

Next steps ​

Code dual-licensed MIT / Apache-2.0. "LibreTerrain" and its logo belong to EllisonDigital.