Skip to content

Sevenudeloin/ISIM-DLA-rendering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DLA meets Raytracing

Implementation of diffusion-limited aggregation (DLA) for procedural terrain generation and realistic rendering based on raytracing, in C++.

Project by Oscar Morand and Ewan Lemonnier as part of the final assignment in an introductory course to image synthesis.

Final results

Rendering a heightmap generated using our DLA algorithm: rendu_final_2

Rendering external heightmaps: redering_only_1

rendering_only_2

DLA for procedural terrain generation (Ewan Lemonnier)

Algorithm concept by Josh's Channel : Better Mountain Generators That Aren't Perlin Noise or Erosion. (09:27)

Diffusion-limited aggregation (DLA) is a natural phenomenon that can be replicated algorithmically, which looks like this:

drawing

Source: Wikipedia

The goal is to create a heightmap using this algorithm, which representents the terrain we want to render. This approach removes the need to use noise for procedural generation, setting it apart from the traditional method.

The aforementioned video presents a nice visualization of how the algorithm works (at 12:04), and is highly recommended to fully understand the proposed implementation.

The code is available in the files with the prefix dla_ in the src/ directory and they are commented! Feel free to take a look and check for yourself, i am open to all kinds of feedback (you can go on my profile to get my email address).

Here are some heightmaps generated with the DLA algorithm:

DLA_heightmap_1

512x512, ~5h runtime, (density: 80%, center: middle)​

DLA_heightmap_2

512x512, ~18h runtime, (density: 35%, center: down-right)​

As you can tell, the main pain point of this algorithm is its runtime. It increases exponentially and stops being viable around 1024x1024 on my machine. The algorithm is bounded to CPU by nature, so optimizations are possible there, but it is not portable to the GPU.

These are still some amazing results in my opinion, and i am glad to have experimented with other ways to make procedural terrain generation!

About

DLA-based procedural terrain generation and realistic rendering.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •