RSSAmplifier

Avoyd devlog · Apr 26, 2024

Voxel GPU Rendering in Avoyd 0.21

0
Sign in to vote or save

Doug Binks · enkisoftware

Doug Binks - - edited       # Avoyd   # Game Technology


This release of Avoyd Voxel Editor has been a long time coming, but it adds a significant feature - a GPU accelerated path tracer for faster renders. In this post I summarise the renderer development, cover the performance gains (with data) and discuss future plans.

Download Avoyd Full

Volcano lighting up the clouds above. The scene was created in Avoyd Voxel Editor by combining Minecraft map Lisrina by Dannypan together with a cloud heightmap, and adding fog material around the volcano. GPU render made in Avoyd version 0.21.
Avoyd Voxel Editor GPU render of map Lisrina by Dannypan, combined with clouds imported as heightmap.

I started to move the CPU path tracing code to the GPU back in August 2023, and showed early results in the devlog post "Implementing a GPU Voxel Octree Path Tracer" and our regular beta releases. The journey has been somewhat convoluted, as I hit a number of issues with complex shader optimization along the way. Avoyd is able to render massive voxel scenes due to the use of a fairly complex data structure, a Direct Acyclic Graph style Sparse Voxel Octree (DAG style SVO). I first discovered that the GLSL code ran over ten times faster using Vulkan instead of OpenGL, found issues with shader optimizers (SPIRV-opt) on some GPUs, and moved the path tracing from a mega-kernel to wavefront path tracing.

If you have a modern discrete GPU you should see a 5x to 10x improvement in render performance over a similarly priced CPU, depending on scene and settings. The CPU renderer remains useful, not only for those with integrated or lower performance GPUs, but also because CPU memory is a lot cheaper so PCs usually have more, making it possible to render extremely large voxel models.

Voxel model GPU rendering in Avoyd.

I took some measurements of performance on two systems to give you an example of what you might expect:

Comparison of CPU and GPU rendering performance of voxel models in Avoyd Voxel Editor.
Voxel Model
(Dimensions in voxels)
Resolution
pixels
CPU
Intel i9 7980XE
35/36 MLP (*)
CPU
AMD Ryzen 9 7950X
31/32 MLP (*)
GPU
AMD RX 7900XTX
GPU
NVIDIA RTX 4070
Cornell_Box
(64 x 64 x 64)
1280x720 25.2s 16.6s 2.9s 2.3s
1920x1080 56.3s 37.4s 4.9s 3.4s
Box_Transparency
(1024 x 256 x 1024)
1280x720 39.2s 25.4s 6.6s 3.5s
1920x1080 88.2s 57.3s 10.0s 5.6s
Box Transparency + Vase
(4096 x 321 x 4096)
1280x720 48.1s 30.8s 12.6s 6.6s
1920x1080 107.7s 69.2s 18.4s 10.6s
Drehmal v2.1 village
(33696 x 256 x 13312)
1280x720 50.5s 33.5s 8.1s 4.5s
1920x1080 115.7s 75.3s 14.9s 8.1s
Drehmal v2.1 top-down
(33696 x 256 x 13312)
1280x720 58.4s 37.7s 20.7s 13.0s
1920x1080 130.7s 84.4s 42.8s 19.5s

Render times are measured at 128 SPP (Samples Per Pixel).
GPU render times are averaged over 5 measurements, discarding the first render.
GPU Render Priority is set to `High`.
Avoyd voxels set to `Full Voxels` (all full cubes, no morphing voxels).
(* CPU Multithreading: MLP (Max Logical Processors) is set to default (MLP / Logical Processors).)


Glass box filled with water above a light source next to a round vase with branches and translucent red fruits. Voxel model made and GPU rendered at 128 SPP in Avoyd Voxel Editor.
Box_Transparency + Vase

Voxel models GPU rendered in Avoyd at 128 SPP.

I'll continue to investigate improving performance after this release, so check out future Beta releases. We plan to work on Renderer Post Process effects (Bloom and Tone Mapping), Video Rendering, and Multi-Model editing whilst also investigating optimising memory consumption and performance.

A multi-level pyramid of rooms and staircases. The base is underwater. The light comes from the right-hand side. Voxel model built and Isometric GPU rendered in Avoyd Voxel Editor 0.21. The structure is inspired by the Carved Cities series by Antoine Lendrevie @Sir_carma
GPU path traced pyramid with base in water. Voxel model created and rendered in Avoyd. Inspired by carved cities by Antoine Lendrevie.

[ Edit 03 May 2024 - Added performance data for Minecraft map Drehmal, village and top-down renders.]

Read the original on enkisoftware.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.