TL;DR
TerraFusion is a novel generative framework that simultaneously synthesizes 3D terrain geometry (heightmaps) and realistic surface textures using a Latent Diffusion Model (LDM). By modeling heightmaps and textures together within a single, fused latent space, the system preserves the natural correlations between landforms and their appearance while giving creators intuitive, sketch-based control over the generated landscape.
What Problem Does This Paper Address?
In virtual world-building—whether for video games or film production—creating realistic 3D terrain is a notoriously difficult balancing act. In nature, a terrain's shape (geometry) and its look (texture) are deeply intertwined: steep cliffs are typically rocky, while flat valleys might be lush and forested.
Most existing deep-learning methods handle these components in isolation, generating either just a heightmap or just a texture. Combining them usually requires a fragile two-stage approach (e.g., generating a heightmap first, then texturing it). These sequential pipelines suffer from error accumulation, where mistakes in the first stage ruin the second. Furthermore, if an artist tries to edit the terrain later via sketches, maintaining the realistic correlation between the modified geometry and the texture becomes incredibly difficult.
Methods
TerraFusion solves this by treating terrain generation as a joint distribution problem, modeling heightmaps ($h$) and textures ($x$) simultaneously.
The architecture consists of three key components:
- Fused Latent Space: To make diffusion computationally efficient, the authors compress the inputs using Variational Autoencoders (VAEs). They use a standard VAE (from Stable Diffusion) for the RGB textures, but train a custom, domain-specific VAE specifically optimized for heightmaps. The resulting latent codes are concatenated along the channel dimension into a single joint representation.
- Prior-Backed U-Net: The core diffusion model is built on top of Stable Diffusion’s pre-trained U-Net. The authors double the input and output channels of the U-Net to accommodate the fused geometry-texture latents and fine-tune the model using a fixed text prompt ("A satellite terrain image.").
- Sketch Conditioning via ControlNet: To give users creative control, the authors integrate a ControlNet adapter. Users can draw rough sketches where different colored lines dictate specific topographic features: red for valleys, green for ridgelines, and blue for cliffs.
Datasets
The model was trained on a multimodal dataset curated from real-world geographic data:
- Geometry: NASADEM elevation data (30-meter spatial resolution).
- Textures: Atmospherically corrected Sentinel-2 satellite imagery (10-meter spatial resolution).
To isolate natural terrain, the authors filtered out heavily human-modified areas, clouds, and extreme arid zones. Crucially, they discovered that VAEs struggle to reconstruct heightmaps when forced to accommodate the entire global elevation range (0 to 8000+ meters). To fix this, they restricted the dataset to regions below 2000 meters, yielding a final dataset of 4,119 paired terrain samples upsampled to $512 \times 512$ pixels.
Key Insights and Ideas
- Natively Fused Latents Beat Sequential Pipelines: By forcing a single U-Net to denoise both geometry and texture channels at the same time, the model naturally learns the bidirectional relationship between slope and color.
- The Importance of Domain-Specific VAE Tuning: Standard image-based VAEs perform poorly on heightmaps because elevation data behaves differently than RGB pixels. Restricting the elevation cap to 2000 meters and applying targeted normalization was the "aha moment" that unlocked crisp, artifact-free geometric reconstructions.
- Transferring Image Priors to Geometry: Even though Stable Diffusion was never trained on elevation data, its massive pre-trained knowledge of structures and textures transfers effectively to heightmaps when fine-tuned via channel concatenation.
Key Results
The authors compared TerraFusion against two-stage LDM baselines ($h \rightarrow x$ and $x \rightarrow h$) and a GAN-based terrain generator (PSGAN).
- Higher Texture Quality: Using the CLIP Fréchet Inception Distance ($\text{FID}_{\text{CLIP}}$) to measure semantic similarity to real terrain, TerraFusion achieved a state-of-the-art score of 9.8, vastly outperforming the $h \rightarrow x$ baseline (24.0) and PSGAN (22.1).
- Stronger Feature Correlation: Quantitative analysis using Pearson correlation coefficients proved that TerraFusion's generated pairs mirror the true statistical relationship between slope and appearance found in real-world data.
- Robust User Control: Qualitative evaluations showed that the ControlNet adapter accurately translates user sketches into realistic topography, successfully handling even highly unusual, non-real-world user inputs.
Limitations and Future Work
While TerraFusion marks a significant step forward, the authors note a few areas for improvement:
- Resolution Constraints: The model currently outputs $512 \times 512$ maps. Scaling to higher resolutions remains a computational challenge.
- Elevation Limits: Because the dataset was capped at 2000 meters to preserve VAE fidelity, the model cannot yet generate high-altitude alpine environments.
- Missing Geomorphological Elements: Professional game artists reviewing the tool noted a lack of explicit secondary features like rivers, lakes, tree lines, and snow cover, which are vital for true landscape realism.
Summary updated