Skip to main content
Euca’s terrain (euca-terrain) is a chunked heightmap world: raise/lower/flatten/smooth brushes, splat layers, per-cell heightfield colliders, and LDtk/Tiled level import. Foliage scatters instanced meshes across an area. Authoring, collider generation, mesh generation, and import all run headless; only drawing the terrain and foliage needs a GPU host.
Headless authoring + physics, GPU display. Heightmap edits, splatting, collider generation, mesh generation, and LDtk/Tiled import run on the :3917 server. Displaying the terrain and the scattered foliage needs a render host.

What it does

  • Heightmap & chunksHeightmap (row-major [0,1] data, cell size, max height) drives a chunk grid; generate_chunk_mesh builds mesh data and select_chunk_lod picks density by distance.
  • Brush editingraise/lower/flatten/smooth with falloff (apply_brush).
  • SplattingSplatMap paints per-cell layer masks.
  • Physicsgenerate_heightfield_colliders produces per-cell AABB tiles that integrate with physics.
  • Importldtk_import and tiled_import turn LDtk/Tiled maps into level data.
  • FoliagePOST /foliage/scatter places an instanced layer (mesh + material, density, scale range, distance-based LOD).

Endpoints

MethodPathDescription
POST/terrain/createCreate a flat heightmap terrain (returns entity + extents)
POST/terrain/editRaise / lower / flatten / smooth at a world position
POST/foliage/scatterScatter an instanced foliage layer across an area
GET/foliage/listList scattered foliage layers with instance counts

Example

# Create terrain, then sculpt a hill at the origin
curl -s -X POST http://localhost:3917/terrain/create \
  -H 'Content-Type: application/json' -d '{"width":64,"height":64,"cell_size":1.0}'

curl -s -X POST http://localhost:3917/terrain/edit \
  -H 'Content-Type: application/json' \
  -d '{"position":[0,0,0],"brush":"raise","radius":8,"strength":2.0}'

Status

  • ✅ Heightmap sampling + normals, chunked mesh gen, distance LOD, brush editing, splatting, heightfield colliders, LDtk + Tiled import, instanced foliage scatter — shipped and headless (for authoring).
  • 🟡 A GPU terrain-generation path exists but is feature-gated and unimplemented!() — the shipped path is CPU mesh generation.

Terrain & foliage endpoints

Create, edit, and scatter endpoints with schemas.