Table of Contents
Fetching ...

Procedural terrain generation with style transfer

Fabio Merizzi

TL;DR

This work addresses generating realistic terrains by fusing procedural generation with Neural Style Transfer to inherit real-world morphology. It uses explicit or Perlin noise as content and real-world height maps as style via a VGG-19-based transfer with Gram-matrix style losses and a total-variation regularizer, optimizing with SGD for $2000$ iterations and weights $α$, $β$, $γ$ in the final loss $Loss = α L_{content} + β L_{style} + γ L_{TV}$. Results show that morphologically transferred maps achieve higher fidelity to real terrains than purely procedural maps, as evidenced by SSIM gains across mountain, river, and desert examples, while maintaining moderate per-image computation on consumer hardware. The approach offers lower training costs than GAN-based methods and provides designers with controllable, customizable terrain generation, with promising future directions including diffusion-based methods for streamlined single-step generation.

Abstract

In this study we introduce a new technique for the generation of terrain maps, exploiting a combination of procedural generation and Neural Style Transfer. We consider our approach to be a viable alternative to competing generative models, with our technique achieving greater versatility, lower hardware requirements and greater integration in the creative process of designers and developers. Our method involves generating procedural noise maps using either multi-layered smoothed Gaussian noise or the Perlin algorithm. We then employ an enhanced Neural Style transfer technique, drawing style from real-world height maps. This fusion of algorithmic generation and neural processing holds the potential to produce terrains that are not only diverse but also closely aligned with the morphological characteristics of real-world landscapes, with our process yielding consistent terrain structures with low computational cost and offering the capability to create customized maps. Numerical evaluations further validate our model's enhanced ability to accurately replicate terrain morphology, surpassing traditional procedural methods.

Procedural terrain generation with style transfer

TL;DR

This work addresses generating realistic terrains by fusing procedural generation with Neural Style Transfer to inherit real-world morphology. It uses explicit or Perlin noise as content and real-world height maps as style via a VGG-19-based transfer with Gram-matrix style losses and a total-variation regularizer, optimizing with SGD for iterations and weights , , in the final loss . Results show that morphologically transferred maps achieve higher fidelity to real terrains than purely procedural maps, as evidenced by SSIM gains across mountain, river, and desert examples, while maintaining moderate per-image computation on consumer hardware. The approach offers lower training costs than GAN-based methods and provides designers with controllable, customizable terrain generation, with promising future directions including diffusion-based methods for streamlined single-step generation.

Abstract

In this study we introduce a new technique for the generation of terrain maps, exploiting a combination of procedural generation and Neural Style Transfer. We consider our approach to be a viable alternative to competing generative models, with our technique achieving greater versatility, lower hardware requirements and greater integration in the creative process of designers and developers. Our method involves generating procedural noise maps using either multi-layered smoothed Gaussian noise or the Perlin algorithm. We then employ an enhanced Neural Style transfer technique, drawing style from real-world height maps. This fusion of algorithmic generation and neural processing holds the potential to produce terrains that are not only diverse but also closely aligned with the morphological characteristics of real-world landscapes, with our process yielding consistent terrain structures with low computational cost and offering the capability to create customized maps. Numerical evaluations further validate our model's enhanced ability to accurately replicate terrain morphology, surpassing traditional procedural methods.
Paper Structure (10 sections, 7 equations, 7 figures, 1 table, 2 algorithms)

This paper contains 10 sections, 7 equations, 7 figures, 1 table, 2 algorithms.

Figures (7)

  • Figure 1: Procedural noise generation: averaging multi-scale random matrices, followed by Gaussian kernel smoothing.
  • Figure 2: Example of a generated Perlin map
  • Figure 3: Morphological transfer of river-like morphology, starting from the real-world source (a) a procedural noise map (b) and the synthesized custom image (c)
  • Figure 4: Morphological transfer of mountain morphology, starting from the real-world source (a) a procedural noise map (b) and the synthesized custom image (c)
  • Figure 5: In this image we report the steps for creating a map with custom features and transferred mountainous morphology. A custom binary map is drawn by the creator (a) and subsequently injected with layers of explicit noise (b). We then apply the Neural Style Transfer, selecting an appropriate source from real world maps, and thus generating the final terrain (c).
  • ...and 2 more figures