Abstract
Over the last decade the computational power of GPUs has grown dramatically, but the entertainment and visual-effects industries — which rely on Monte Carlo path tracing for photorealistic imagery — still overwhelmingly run on CPUs. Research GPU path tracers exist, but most are built in CUDA and tied to NVIDIA hardware, and none offer a full implementation of volumetric path tracing through the kind of thin, optically-dense, highly anisotropic heterogeneous media that fabrics are made of.
This master’s thesis proposes a non-proprietary, cross-platform rendering engine that runs entirely on the GPU and is specialized for photorealistic rendering of virtual garments at fiber level.
Contributions
- A cross-platform GPU path tracer implemented in OpenGL + GLSL, which runs on any modern GPU rather than requiring CUDA.
- A GPU volumetric path tracer for heterogeneous participating media, solving the transport equation via Woodcock (delta) tracking.
- A fiber-level phase function for textile cloth extending the model of Khungurn et al. [2015] from two to three lobes (R, TT, TRT), yielding a closer fit to real fiber scattering with analytic evaluation and importance sampling.
- A screen-space memory scheduler that adaptively subdivides the image into RenderBatches so that the volumetric grid of each batch fits into GPU memory, with a homogeneous-medium fallback for rays that leave the current view frustum.
Method
Fabrics are represented as anisotropic participating media stored in a two-level sparse voxel grid. To sidestep the absence of sparse pointer structures in GLSL, the grid is encoded with OpenGL Bindless Textures: a dense top level lives in an SSBO and holds bindless handles that point to 3D textures for the occupied bottom-level bricks, with a null handle marking empty space.
Inside each medium, rays are advanced using Woodcock tracking tuned per-medium by a conservative extinction bound. The extended fiber phase function is fed into the path tracer through an analytic-CDF approximation — a Gaussian fit to the von Mises distribution — so that sampling stays fast and bounded without tabulated CDFs. Long-running shader invocations are interrupted and resumed via an explicit state-saving pass to avoid GPU-driver timeouts on high-density volumes.
The integrator supports stratified jittered sampling and a reconstruction filter, and handles non-volumetric surfaces with a Disney principled BRDF plus measured BSDFs for comparison.
Results
The engine renders plausible cloth at fiber level — reproducing soft silhouettes, subsurface transport, and the anisotropic highlights of woven and knitted fabrics — at interactive-to-minutes-per-frame rates on commodity GPUs. Full-garment scenes are rendered end-to-end on the GPU using procedurally generated, voxelized yarn data.
Comparisons against Disney BRDF and measured surface models on the same scenes show that the volumetric approach recovers appearance cues that surface shading alone cannot, while comparisons against CPU references validate the correctness of the GPU implementation.
Future Work
Future work could focus on improved Woodcock tracking under strongly correlated media, better render-batch scheduling to further reduce memory pressure, and richer lighting integration for the engine.