Skip to content

Latest commit

 

History

History
101 lines (74 loc) · 2.92 KB

README.md

File metadata and controls

101 lines (74 loc) · 2.92 KB

CUDA Path Tracer

Cornell Box, 1k*1k resolution, SPP 4096, Max Depth 20


Environment

  • cuda/11.7.0-7sdye3
  • Nvidia V100 GPU

Getting Started

Linux or Mac

./scripts/setup.sh

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

Windows

./scripts/setup.bat

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

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

Features

  • BVH Acceleration Structure
  • Monte Carlo Integration
  • Direct Lighting with Multiple Importance Sampling
  • Physically-Based Materials
    • Lambertian: a classic diffuse material used to represent rough surfaces
    • Dielectric: a transparent material having both reflection and refraction. Used to simulate glass, water, air or any "clear and specular" media
    • Metallic workflow: a popular material model used in the industry. It has two parameters, Metallic and Roughness. By changing the value of two parameters, we can simulate a variety of materials such as plastic, glossy metal and mirror. It's very expressive and artist friendly, and easy to combine with textures to create realistic rendering. The model implemented by the renderer is a mixture of Lambertian diffuse and Trowbridge-Reitz (GGX; GTR2) microfacet specular
  • OpenMP Parallelism for CPU Path Tracer
  • Russian Roulette for Path Termination for CPU Path Tracer
  • Faster Tree Traversal on GPU: Multiple-Threaded BVH

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

Contributors