↓ Skip to main content
Featured image for Devlog #3 • Engineering the Landscape

Devlog #3 • Engineering the Landscape

·561 words·3 mins
Jannis
Author
Jannis

This week in YUMA marked a shift from experimentation to building-something-actually-useable. I’ve been digging deep into the core terrain system, refining the noise algorithms, and optimizing how the engine handles the transition from random numbers, generated by the GPU to a rendered world, which was a journey.

Refining the Noise: From Randomness to Geology
#

It started with basic noise functions, but “random” doesn’t mean “natural.” I moved beyond simple Perlin and Simplex layers, focusing on combining specific octaves to simulate realistic terrain features.

Procedural noise octave combination test render

The goal was to create a noise pipeline that feels purposeful. By tweaking frequency and amplitude and applying Domain Warping (turbulence) mountains now rise with jagged peaks, while valleys smooth out naturally. I’ve laid the groundwork for a more hydraulic-looking flow, even before implementing actual erosion simulations. It’s starting to look like geography or some weird abstract-art stuff.

Domain warped noise map test render with mountain ridges and valleys

Marching Cubes: Optimizing the Mesh
#

The transition from voxel data to smooth geometry is handled by the Marching Cubes algorithm. While seeing the world turn from blocks to smooth surfaces is always satisfying, the real battle this week was performance and continuity.

Generating a mesh is easy; generating it fast enough for an infinite world is hard. I spent a lot of time optimizing the mesh generation pipeline:

  • Chunk Management: Restructuring how chunks are cached and updated to prevent stuttering.
  • Normal Calculation: Moving away from flat shading to smooth, computed vertex normals that make lighting interact correctly with the curves of the terrain.
  • Seam Stitching: Ensuring there are no visible gaps between chunks when the LOD (Level of Detail) changes.

The result is a mesh that feels massive but retains the intricate details needed for close-up gameplay.

Marching cubes terrain mesh wireframe test render Marching cubes terrain mesh surface test render Marching cubes procedural terrain elevation test render Marching cubes terrain chunk continuity test render Marching cubes level of detail LOD seam test render Marching cubes terrain smooth vertex normals test render

The Shader Playground: Solving the “Tiling” Problem
#

With the geometry stabilized, I shifted focus to the visual layer. Writing custom HLSL shaders was critical here. Standard UV mapping doesn’t work well on procedural voxels textures stretch on cliffs or repeat obviously on flat plains.

Triplanar mapping test render on steep procedural cliff

To solve this, I implemented Triplanar Mapping combined with Stochastic Sampling, although im not very confident that everything is implemented 100% correct, it does somehow look good…

  1. Triplanar Mapping projects textures from three axes, ensuring cliffs look like cliffs and grass looks like grass, regardless of the geometry’s angle.
  2. Stochastic Blending was the gamechanger for realism. It randomizes the texture lookup slightly to break up repetitive patterns.
Stochastic texture sampling test render breaking repeating patterns Slope-based procedural terrain material blend test render

Now, instead of seeing a repeating grid of grass textures, the ground looks like a continuous, organic surface. I also added logic to blend layers based on slope automatically applying rock textures to steep angles and moss/grass to flat areas without manual painting. The Blending of diffenrent materials is not tackled yet, thats a quest for another day.

Why This Matters
#

Texturing a voxel landscape is deceptively hard. It’s easy to make it look like a repetitive video game but it’s hard to make it look like a place. By combining runtime noise masks with these advanced shader techniques, I’ve managed to create transitions that feel organic.

Procedural terrain preview render with organic material transitions Procedural landscape preview showing distant mountain ranges

The engine isn’t just rendering random junk anymore, it’s synthesizing a believable environment in real-time almost fully on the GPU (which was a pain, but a worth one)

Real-time synthesized procedural voxel landscape test render

Next Steps
#

  • LOD Refinement: Pushing the draw distance further without melting the GPU or CPU.
  • Biome Logic: Using temperature and humidity maps to dynamically change vegetation (or better, have vegetation at all…)