Skip to content

Releases: BCaven/OfflineRaytracingGPU

New traversal algorithms, fractals, performance benchmarks

Choose a tag to compare

@BCaven BCaven released this 30 Oct 19:31

eye candy

This release contains many new features:

  • stack based traversal methods have been moved to shared workgroup memory - this alone is a massive performance boost (~10x)
  • threaded BLAS (stackless traversal that replaces individual instances in the acceleration structure)
  • stratified wavelengths for spectral rendering
  • LBVH binary AABB construction
  • bug fixes

The README has also been extensively updated and there are new demo scenes.

Gifs, rendering to files, automated rendering of dynamic scenes

Choose a tag to compare

@BCaven BCaven released this 23 Sep 20:59

prism demo

This release changes how scenes get rendered.

The concept of time and time_delta have been added. Both are public members of VK_Wrap.
clearPrimitives() and reloadPrimitives() helper functions have been added to support dynamic scenes.

Spectral path tracing

Choose a tag to compare

@BCaven BCaven released this 07 Sep 16:14

The engine has been switched to scatter rays based on their wavelength.
prisms

This release also contains better API support for nested transforms from #v0-4-transform

New features:

  • spectral scattering
  • VulkanHelper.loadCollection(vector<PackedRef>) API function

Transforms, Instancing, 8-wide KDOP BLAS

Choose a tag to compare

@BCaven BCaven released this 26 Aug 17:20

Transforms!

transform example

Transforms (location, rotation, scale) are now part of the engine.

Other new features:

  1. Instancing
  2. TLAS/BLAS separation
  3. Wide trees
  4. KDOP bounding boxes
  5. Mixed wide/binary trees
  6. Transformed primitives
  7. misc performance optimizations

Notes:

In this update, transforms are nodes with one child that manipulate the ray that hits them. Transforms are tracked using a separate stack.

Instancing is a natural byproduct of transforms. Constructors such as loadSplat and loadObj now return pointers to their instances and transforms add an instance of that mesh/splat to the scene graph.
The scene graph then looks like:

root
├── transform
|        └──Instance BLAS
└── transform 
         └──Instance BLAS

The scene graph supports more elaborate structures with nested transforms and BLAS structures with chains that might look like

root
└── transform
          └── Group BLAS
                   ├── Instance BLAS
                   └── transform 
                           └── Instance BLAS

Or any other combination of tree, transform, and primitive nodes

Performance considerations

Performance has been increased considerably from previous versions.
According to NVIDIA Nsight the primary source of warp latency and stalls is Long Scoreboard stalls when retrieving primitive, acceleration structure, and stack nodes from memory.
Gaussian splat primitives are especially taxing on the acceleration structures due to their oblong and overlapping natures. Triangle meshes do not see the same performance impact as Gaussians of the same size due to triangle meshes usually not having large amounts of overlap and triangles are usually uniform in size.
Work is being done to reduce the latency. At the moment, wide KDOP acceleration structures provide 10x performance improvement compared to traditional binary AABBs, reducing the number of traversals (caused by fewer bounding box misses) and increasing ray throughput. The acceleration structure still struggles with large (5+ million primitive) BLAS.
That being said, this release can support moderate numbers of primitives at interactive framerates (30+ fps, 19ms per frame with spikes of 30-40 ms).

Progressive Rendering, Gaussian Splat primitive support

Choose a tag to compare

@BCaven BCaven released this 11 Aug 18:48

5.9m splats

Added support for progressive rendering described as the following:
Frames: single pass of the fragment shader - progresses each ray by a single bounce
Images: combination of MAX_BOUNCES number of frames - is a single complete pass of the monte carlo path tracer
History: sum of all images that have occurred with the same scene parameters - the final render

Added support for Gaussian Splat primitives:
Uses a modified version of the collision algorithm described in Stochastic Ray Tracing of Transparent 3D Gaussians
Gaussian Splats are native primitives in the same way they are in my CPU path tracer

LBVH, Lights, Triangles, Obj loader

Choose a tag to compare

@BCaven BCaven released this 06 Aug 22:02

second image

This release adds:

  • Triangle Primitives
  • GPU BVH traversal
  • Obj Mesh loader
  • Mesh lights

Raytracing in One Weekend: GPU Edition

Choose a tag to compare

@BCaven BCaven released this 05 Aug 15:32

spheres

This release is the foundation of the engine and includes all features found in Raytracing in One Weekend: GPU Edition.
Support includes:

  • Spheres
  • Instanced Materials
  • FP Camera including FOV control