If you have ever dropped a free terrain heightmap from the internet into Unreal Engine 5 Landscape Mode or a Blender Displace modifier, you have probably seen the exact same defect: smooth mountain slopes turning into Minecraft-style contour terraces.

The root cause is almost always bit depth. An 8-bit grayscale PNG only stores 256 discrete height steps. Spread 256 steps across a 1,000-meter mountain range and every step is a 3.9-meter cliff ledge. No amount of smoothing brush fixes stair-stepping once the source data has already been quantized.

Here is the GPU workflow I built for TerraKit (including 3 free MIT 16-bit terrains you can test right now) to produce true 16-bit linear .png and raw .r16 heightmaps with physically simulated drainage networks.

1. Smooth-Abs Ridged Tectonics (No Razor Creases)

Classic ridged multifractal noise computes 1.0 - abs(2 * n - 1). On coarse octaves, abs() creates sharp V-shaped fold creases that look artificial when viewed from a low-angle camera.

Replacing abs(x) with a smooth hyperbolic approximation sqrt(x^2 + eps) keeps crisp alpine crests while eliminating thin fin artifacts:

r = 1.0 - torch.sqrt((2.0 * n - 1.0) ** 2 + 0.025) r = torch.clamp(r, 0.0, 1.0) ** 2 

Pair that with padding_mode="reflection" on domain warping (F.grid_sample) so edge pixels never smear into flat border steps.

2. Vectorized GPU Droplet Hydraulic Erosion

Plain fractal noise never looks like real geology because water has not flowed across it. Instead of running slow CPU loops, I vectorized 450,000+ rain droplets directly in PyTorch CUDA (32,768 droplets per parallel batch over 75 integration steps):

  • Sample bilinear terrain gradient (gx, gy) at each droplet's floating-point position.
  • Update velocity, inertia, water volume, and sediment capacity.
  • Erode with a 3x3 weighted brush via scatter_add_ (preventing single-pixel needle spikes) and deposit carried sediment bilinearly into alluvial valleys.
  • Accumulate every droplet's water flux into a dedicated flow tensor. That tensor becomes the exact Green channel (G) of the companion RGBA splatmap.

Follow hydraulic erosion with 35 to 50 iterations of 8-neighbor thermal talus relaxation so over-steep cliffs shed natural scree aprons.

3. Exact 16-Bit Linear Scaling and UE5 Z-Scale Math

Unreal Engine 5 expects Landscape tiles at specific component dimensions (1009, 2017, or 4033) and maps 16-bit unsigned values (0 to 65535) onto -256 to +256 Unreal units at Z-Scale = 100.

To preserve full dynamic range with 0.0% clipped peaks, normalize linearly into [0.015, 0.965] (u16 range 983 to 63241), export both PNG (I;16 grayscale) and raw little-endian .r16, and compute the exact UE5 scale values automatically:

ue5_z_scale = round(height_range_m * 100.0 / 512.0, 2) ue5_xy_scale_2017 = round(world_size_m * 100.0 / 2016.0, 2) 

For a 4034 m tile with 1080 m of alpine relief, that gives XY Scale = 200.1 and Z Scale = 210.94. No trial-and-error stretching in the viewport.

4. Pixel-Aligned RGBA Splatmaps + Automated QA

Rather than shipping raw heightmaps alone, every tile exports a pixel-aligned 2017x2017 RGBA splatmap:

  • R: Slope / exposed cliff rock
  • G: Log-compressed hydraulic flow channels (from the actual droplet simulation)
  • B: Multi-scale ridge convexity (for snow caps or wind-scoured ridges)
  • A: Multi-scale cavity ambient occlusion

Every generated file runs through an automated binary QA gate verifying true 16-bit PNG IHDR headers, exact .r16 byte counts (8,136,578 bytes for 2017x2017, 32,530,178 bytes for 4033x4033), zero clipping, and a headless Blender 5.2 LTS Cycles beauty + clay verification render before packaging.

Inspect All 12 Biomes Live in WebGL2

You can orbit all 12 eroded biomes in real time (switching between Biome Shaded, Clay Matte, Splat RGBA channels, and Topographic Contours) or download the 3 free MIT starter terrains (01-matterhorn-ridge, 04-redrock-canyon, 07-obsidian-caldera):