โ† All examples

mesh algorithms

Heightmap terrain from fractal noise

Generate a square terrain mesh from seeded fractal gradient noise, with central-difference normals, UVs and colours banded by height and slope. Use it for game ground, backdrops and test terrain.

Recorded render of Heightmap terrain from fractal noise

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • example.gltf
  • heightmap_fbm_terrain.py
  • meshkit.py
  • preview.png
  • test_package.py
  • verification/native.json

How it works

Entry points
height_at, terrain_color, heightmap_terrain, main
Parameters
size, resolution, height, feature_size, octaves, seed
Complexity
O(resolution^2 * octaves)
Axes
+Y up, metres

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • generator_runs_system_python
  • generator_runs_verifier_python
  • gltf_strict_structure
  • interpreters_agree
  • example_matches_generator
  • godot_headless_gltf_load
  • godot_compatibility_render

Limits to consider

A single height per (x, z): no overhangs, caves or arches. The noise is not periodic, so tiles do not wrap. Heights stay within about plus or minus the height parameter (at most twice it). The colour bands are a fixed stylized palette, not a physical material model.