Skip to content

Globally Illuminated Voxel Worlds Accelerated with Nested Axis-Aligned Distance Fields

License

Notifications You must be signed in to change notification settings

cg-tuwien/NAADF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAADF: Globally Illuminated Voxel Worlds Accelerated with Nested Axis-Aligned Distance Fields

teaser A minecraft world rendered in real-time without using LOD. The world is 8256^2 voxels large.

Introduction

This voxel engine is an implementation of our research paper "NAADF: Globally Illuminated Voxel Worlds Accelerated with Nested Axis-Aligned Distance Fields".
It supports dynamic entites and editing with a world size of up to 16384^3 voxels.

Implementation Details

The engine is using the MonoGame framework. In order to support compute shaders, the fork from cpt-max is used.

The data structure consists of 3 layers. 4^3 voxels are grouped into blocks, and 4^3 blocks are again grouped into a chunk. Empty space is using AADFs to accelerate ray traversal. In contrast to Signed Distance Fields (SDF), AADFs are directional along each axis (x-, x+, y-, y+, z-, z+) resulting in significantly improved performance.

The engine uses its own voxel format (*.cvox) which is simply the chunk, block and voxel buffer compressed as a ZIP archive.
World generation happens on the GPU. Editing and entity logic is done on the CPU and then synchronized with the GPU.

Points of interest

Usage

Voxel models with the format *.vox and *.vl32 can be imported. Meshes (*.obj and *.stl) can also be voxelized directly.
When doing any expensive operations (e.g. importing, saving, ...), look into the console window for progress.

Example voxel models can be found from vengi-voxel.
The default scene is Oasis from Hard Cover.

Controls

  • WASD — Main movement
  • Shift — Speed increase
  • Left Control — Down
  • Space — Up
  • Left/Right Arrows — Sun inclination
  • F1 — Toggle GUI
  • Right click — Camera rotation

Building from source

Requirements

  • Visual Studio with the ".Net desktop development" package, ".Net Runtime 8.0" and ".Net Runtime 6.0" component
  • "MonoGame Framework C# project templates" from extensions

In Settings.cs and settings.fxh some build flags can be configured.

Currently only Windows 10/11 is supported.

About

Globally Illuminated Voxel Worlds Accelerated with Nested Axis-Aligned Distance Fields

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •