Back to Works

FFT Terrain

Terrain shading and player-centred runtime streaming for a procedural FFT landscape.

Terrain Shading & Runtime Optimisation

This chapter develops the FFT-generated height data into a complete terrain system. It focuses on two connected problems: building a material that responds to procedural geometry and maintaining a continuous landscape around the player without generating an unlimited number of terrain meshes.

Terrain Shading Pipeline

Height Mask

The generated elevation data is converted into masks that separate the terrain into height-dependent regions. These masks provide the foundation for assigning and blending different surface treatments.

Vertex Colour

Vertex colour stores additional surface information directly on the procedural mesh, allowing the material to respond to local terrain features and blend layers without relying on a unique texture for every tile.

Final Material

The final Unreal Engine material combines the height mask and vertex colour with world-aligned textures and procedural noise. Height-based blending establishes the main surface regions, while noise introduces smaller variations and reduces visible repetition across adjacent terrain tiles.

The pipeline moves through three stages:

  1. Generate the height mask from procedural elevation data.
  2. Encode surface information through vertex colour.
  3. Assemble the final material using layered, world-aligned blending.

Player-Centred Tiles

The landscape is divided into a bounded set of reusable tiles positioned around the player. The central area represents the currently active terrain, while tiles outside the required range can be recycled for new positions.

This approach allows the visible landscape to follow player movement while avoiding the cost of permanently retaining every generated tile.

FFT-driven terrain generation

Runtime Update Flow

  1. Detect player movement — check whether the player has crossed the update threshold.
  2. Determine the tile ring — calculate which surrounding terrain positions are required.
  3. Generate or reuse tiles — create missing terrain or reposition an available recycled tile.
  4. Recycle distant tiles — return tiles outside the active region to the reusable pool.

Active Tiles

Tiles within the player-centred region remain visible and continue to form the playable landscape.

Recycled Tiles

Distant tiles are retained as reusable objects, then moved and regenerated when the player requires terrain in a new direction.

Performance Strategy

The runtime system concentrates generation work near the player and reuses existing terrain objects wherever possible. Its performance evaluation is structured around comparing repeated creation with tile reuse, including the cost of generation, updates, and the number of active terrain pieces.

Project Highlights