Skip to content

Another CUDA implementation of a path tracer, but with many HPC optimizations.

Notifications You must be signed in to change notification settings

kevinsadi/Towards-Realtime-PathTracing

Repository files navigation

Towards Real-Time Path Tracing

Cornell Box,1k*1k resolution, 4096spp, 20traceDepth


Environment

  • cuda/11.7.0-7sdye3
  • Nvidia V100 GPU

Getting Started

Linux or Mac

./scripts/setup.sh

./scripts/run.sh cpu_path_tracer 
# or
./scripts/run.sh cpu_path_tracer <SPP>
# or
./scripts/run.sh cpu_path_tracer <SPP> <MaxDepth>

Windows

./scripts/setup.bat

./scripts/run.bat cpu_path_tracer 
# or
./scripts/run.bat cpu_path_tracer <SPP>
# or
./scripts/run.bat cpu_path_tracer <SPP> <MaxDepth>

Now, view the output image in the out directory at root.

Parameters

# cpu path tracer, spp=4096, traceDepth=20, openMP threads=256
build/cpu_path_tracer/cpu_path_tracer 4096 20 256

# cuda path tracer, spp=4096, traceDepth=20, cuda threads=256, Singlekernel Mode
build/gpu_path_tracer/gpu_path_tracer 4096 20 256 1
# cuda path tracer, spp=4096, traceDepth=20, cuda threads=256, StreamCompaction Mode
build/gpu_path_tracer/gpu_path_tracer 4096 20 256 2

Features

Multiple Importance Sampling

MIS


Roadmap

  • CPU Path Tracer
  • Anti-Aliasing by Jittered Sampling
  • Construct GPU-friendly BVH
  • Self-defined material description file

GPU Parallelism

  • Naive GPU Path Tracer
    • Thread-per-pixel parallelism (# of threads = # of pixels)
  • GPU Path Tracer
    • Thread-per-path parallelism (# of threads = # of paths = # of pixels * SPP)
  • Work-Efficient GPU Path Tracer
    • Thread-per-ray parallelism (fixed # of threads)

Rendering

  • Naive Diffuse Surfaces
  • Lambert Material
  • Metal Material
  • Dielectric Material

Acceleration Structures

  • Naive BVH
  • SAH BVH

Future Work

About

Another CUDA implementation of a path tracer, but with many HPC optimizations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published