MIT License

项目介绍

jan-van-bergen/GPU-Raytracer 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 990 个 Star、51 次 Fork。

仓库全名
jan-van-bergen/GPU-Raytracer
开源许可证
MIT License
Star 数
990
Fork 数
51
未关闭 Issue
2

README 摘要

CUDA Pathtracer Interactive CUDA pathtracer that implements a variety of rendering techniques. Features Wavefront rendering, see Laine et al. 2013 Multiple BVH types Standard binary SAH-based BVH SBVH (Spatial BVH), see Stich et al. 2009. This BVH is able to split across triangles. BVH4 (Quaternary BVH). The BVH4 is a four-way BVH that is constructed by iteratively collapsing the Nodes of a binary BVH. The…

完整内容见 GitHub 原始 README 或本页 。

常见问题

GPU-Raytracer 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 990 个 Star。

GPU-Raytracer 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 GPU-Raytracer 的源码?

可以直接克隆仓库:git clone https://github.com/jan-van-bergen/GPU-Raytracer.git,默认分支为 master;安装与运行步骤见仓库 README。

GPU-Raytracer 最近还在维护吗?

仓库最近一次更新为 2022年7月22日,当前有 2 个未关闭 Issue;Star 数为 990,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

GPU Raytracer from scratch in C++/CUDA

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1109
价值分
610
活跃状态
活跃

语言占比

Batchfile
C
C++
Cuda
GLSL
Objective-C
Python

Release

README

CUDA Pathtracer

Stormtrooper Monster Sir Muttonchop

Interactive CUDA pathtracer that implements a variety of rendering techniques.

Features

  • Wavefront rendering, see Laine et al. 2013
  • Multiple BVH types
    • Standard binary SAH-based BVH
    • SBVH (Spatial BVH), see Stich et al. 2009. This BVH is able to split across triangles.
    • BVH4 (Quaternary BVH). The BVH4 is a four-way BVH that is constructed by iteratively collapsing the Nodes of a binary BVH. The collapsing procedure was implemented as described in Wald et al. 2008.
    • BVH8 (Compressed Wide BVH), see Ylitie et al. 2017. Eight-way BVH that is constructed by collapsing a binary BVH. Each BVH Node is compressed so that it takes up only 80 bytes per node. The implementation incudes the Dynamic Fetch Heurisic as well as Triangle Postponing (see paper). The BVH8 outperforms all other BVH types.
    • BVH Optimization. The SAH cost of binary BVH’s can be optimized using a method by Bittner et al. 2012.
    • All BVH types use Dynamic Ray Fetching to reduce divergence among threads, see Aila et al. 2009
  • Two Level Acceleration Structures
    • BVH’s are split into two parts, at the world level (TLAS) and at the model level (BLAS). This allows dynamic scenes with moving Meshes as well as Mesh instancing where multiple meshes with different transforms share the same underlying triangle/BVH data.
  • SVGF (Spatio-Temporal Variance Guided Filter), see Schied et al. Denoising filter that allows for noise-free images at interactive framerates. Also includes a TAA pass.
  • Participating Media (homogeneous)
    • Intuitive, artist friendly parameters: Instead of the usual σa and σs parameters the more intuitive C (multiscatter albedo) and mfp (mean free path) parameters are provided. The σa and σs parameters are then solved for using Van de Hulst albedo inversion. (See Hitchhikers Guide to Multiple Scattering)
    • Multiple Importance Sampling* (MIS): Sample scattering distance for each wavelength using MIS (see Wrenninge et al.)
  • Importance Sampling
    • Next Event Estimation (NEE): Shadow rays are explicitly aimed at light sources to reduce variance.
    • Multiple Importance Sampling (MIS): Explicit light sampling (NEE) is combined with standard BRDF sampling using MIS to get the best of both.
    • Cosine weighted direction sampling for diffuse bounces.
    • Microfacet sampling as described in Heitz 2018
  • Mipmapping: Textures are sampled using mipmapping. Mipmap sampling is done using ray cones (see Möller et al. 2012, Möller et al. 2019). Primary rays perform anisotropic sampling, subsequent bounces use isotropic sampling.
  • PMJ02 Sampling: The low discrepency sampler by Cristensen et al. 2019. Sequences are decorrelated using Cranley-Patterson rotations with blue noise.
  • Hot Reloading: When F5 is pressed the CUDA module is recompiled from source to allow for interactive debugging and development.
  • PBR Material types
    • Diffuse (Lambertian)
    • Plastic (Specular on top of diffuse)
    • (Rough) Dielectric
    • (Rough) Conductor
  • Energy Preservation: Kulla-Conty approximation for multi-scattering is implemented for Dielectrics and Conductors such that they pass a furnace test.
  • Mitsuba XML Scene support: A custom Mitsuba XML parser is included to load scene files. Custom loaders for OBJ and PLY files are available.

Screenshots

SVGF Denoising SVGF: Raw output of the pathtracer on the left and the filtered result on the right.

Kulla Conty Multiscatter Kulla Conty Multiscatter for dielectrics comparison: at the top single scatter, at the bottom multiscatter approximation.

Staircase Marble Still-Life LEGO Bulldozer Glass-of-Water Kitchen Candles Editor

For more screenshots, see the Screenshots folder

Usage

Camera can be controlled with WASD for movement and the arrow keys for orientation. Shift and space do vertical movement. Various configurable options are available as command line arguments. Use command line option --help to see an up to date list.

Dependencies

All dependecies (headers, libs, and dlls) except CUDA 11.0 are included in the repository. The project requires that the CUDA_PATH system variable is set to the path where the CUDA SDK is installed.

Scene Sources

评论

暂无评论