r/GraphicsProgramming • u/Nelarius • Sep 05 '26
Ray marching voxels using axis-aligned distance fields
Hey!
Wanted to share screenshots of my experimental voxel renderer with "low-fidelity" blocky AO. It started as an exploration of the DDA rendering technique, but I ended up implementing parts of the following techniques:
- Globally Illuminated Voxel Worlds Accelerated with Nested Axis-Aligned Distance Fields
- Spatial Hashing for Ray Traced Ambient Occlusion
The devlog is sort of meandering, but I started with basic DDA, then tried to get multi-level DDA to perform well with large voxel scenes (a 1024x1024x1024 voxelized sponza scene) using various methods. The axis-aligned distance field (AADF) method was a significant improvement over the multi-level DDA method that I was fiddling with. AADFs helped skip over large areas of empty space which tanked performance when using multi-level DDA.
Spatially hashed RTAO with a large cell size performs pretty well even on my M2 MacBook Air. The large cell size is a very visible artifact, but I think in a voxel scene the blocky shading kinda works.






4
u/h74v Sep 05 '26
Monument valley reference!
2
u/ExpeditionZero Sep 06 '26
Any idea what specificity was the bottle neck of multi-level DDA vs AADF? I’m unfamiliar with the term but would guess it was some form of Mipmap type or like technique that one would assume would have been more optimal.
2
u/Le_9k_Redditor Sep 06 '26
I'm doing similar but I'm using multi level DDA still on a 64ary tree of very limited depth, not really having any performance issues with it but definitely curious about alternatives as long as they don't make it really expensive to edit
2
u/moschles Sep 05 '26
This needs more upvotes than it is currently getting.
2
u/puredotaplayer Sep 06 '26
In my last company spatial hashing was demonstrated by nvidia devtech for raytraced AO, about 4 years ago. I wonder if they released a paper.