SuikaSibyl / vxpg

Real-Time Path Guiding Using Bounding Voxel Sampling

Home Page:https://suikasibyl.github.io/vxpg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vxpg

code for SIGGRAPH 2024 paper "Real-Time Path Guiding Using Bounding Voxel Sampling".

project page: https://suikasibyl.github.io/vxpg


Noteice: The current codebase is a bit messy,
and there could be problems to build the project.
Please contact me through hal128@ucsd.edu for any questions.
I'll probably upload a clean and more easy to build version latter.

Our implementation bases on my toy renderer SIByL2023, and the code is already in the πŸ‘ˆ repo.

Here is a walkthrough of relevant files and codes:


Render Graphs

The render pipelines in SIByL are defined and scheduled with Render Dependency Graph (RDG).

For simplicity, I serialize the pipeline and show them below. In the paper, we present 3 variants of vxpg pipeline:

1. vanilla vxpg [cpp]

High-Level Pipeline Actual Pass Description Code
Render VBuffer RayTraceVBuffer render and hold V-Buffer for further reuse of 1st shading points [cpp][slang]
Geometry Injection PrebakeDummyPass load prebake geometry information from external resources [cpp]
VXGuiderClearPass clear relevant resources for geometry & light injection [cpp][slang]
VXGuiderGeometryDynamicPass dynamic objects geometry injection [cpp][slang]
Light Injection VXGuider1stBounceInjection draw 1st path sample, inject the irradiance to voxels [cpp][slang]
VXGuiderCompactPass compact all populated voxels for faster manupulation later [cpp][slang]
Superpixel Clustering InitClusterCenterPass set 64x64 pixel tile center as cluster center [cpp][slang]
FindCenterAssociationPass use gSLICr to find nearst pixel cluster in local 3x3 field [cpp][slang]
Supervoxel Clustering VXInfoClearPass clear data relevant to voxel clustering [cpp][slang]
RowColumnPresamplePass randomly select 1 pixel per superpixel & 1 vertex per populated voxel [cpp][slang]
RowVisibilityPass for each voxel, use the selected vertex to evaluate the mutual visibility with every representative pixels proposed in πŸ‘† pass; then pack the visiblity as a unsigned int bitfield [cpp][slang]
RowKmppCenterPass use kmpp to initialize voxel cluster center by visibility bitfield [cpp][slang]
RowFindCenterPass find the nearest voxel cluster, which has most similar visibility bitfield [cpp][slang]
Supervoxel Merging (optional) VXTreeEncodePass encode the voxels with cluster and position information [cpp][slang]
BitonicSort Subgraph sort the voxels as tree leaves for parallel tree building [cpp][slang]
VXTreeIIntializePass initialize tree leaves and nodes for parallel tree building [cpp][slang]
VXTreeInternalPass and this is parallel binary tree building [cpp][slang]
VXTreeMergePass merge voxel nodes along the binary tree to get cluster information (bounding box, irradiance sum) [cpp][slang]
LightSlice Building VXInfoRearrangePass rearange voxel information for further visibility check [cpp][slang]
SPixelClearPass clear the data structure relavent to superpixel samples [cpp][slang]
SPixelGatherPass each superpixel draw some sample pixels from its domain [cpp][slang]
SPixelVisibilityEXPass and we compute mutual average visibility and contributions between each pair of superpixel and supervoxel [cpp][slang]
VXTreeTopLevelPass build the sampling distribution for LightSlice [cpp][slang]
Path Tracing!! VXGuiderGIPass do adaptive guided sample, and MIS here [cpp][slang]

2. ReSTIR GI + vxpg [cpp]

High-Level Pipeline Actual Pass Description Code
Render VBuffer RayTraceVBuffer render and hold V-Buffer for further reuse of 1st shading points [cpp][slang]
Hold GBuffer VBuffer2GBufferPass convert VBuffer to GBuffer for ReSTIR usage [cpp][slang]
GBufferHolderSource hold and load the GBuffer from previous frame [cpp]
VXPG ... all passes similar to previous section, the only difference is that the guided samples are stored as proposal reservoirs πŸ‘†
ReSTIR Reuse TemporalResampling temporal reuse [cpp][slang]
SpatialResampling spatial reuse [cpp][slang]
Shading FinalShading finally shading the scene with ReSTIR samples [cpp][slang]

3. A-SVGF + vxpg [cpp]

High-Level Pipeline Actual Pass Description Code
VXPG ... all passes similar to previous section, the only difference is that the guided samples are stored as proposal reservoirs πŸ‘†
A-SVGF ... again lots of passes for A-SVGF, just read the code πŸ‘‰ [cpp][slang]

About

Real-Time Path Guiding Using Bounding Voxel Sampling

https://suikasibyl.github.io/vxpg