Photon beam rendering algorithm implemented with DirectX12 and RTX
This is a portfolio project made with intention to implement Photon Beam rendering algorithm using DXR and DirectX 12.
Photon Beam is a rendering algorithm developed by Disney for descriging radiance due to volumetric participating media.
This application loads a GLTF 3D model file. BRDF equation used for surface refelections on the 3D model follows BRDF in GLTF specification for surface reflection.
For rendering, this application uses
- Photon beam method for volumetric participating media radiance estimation
- Photon mapping method for surface radiance
- Simple raytracing for specular reflection on 3D model objects with zero roughness.
Watch above video for checking how the implementation works.
For more detailed background of the techinques used, you may check the references.
- You need to install Windows SDK, which can be installed from Visual Studio Installer.
- In the Windows SDK folder (typically located at Program files/Windows Kits/10/),
search for
dxil.dll
file anddxcompiler.dll
file for your machine(arm64, x64 or x86), and copy those files toPhotonBeam
folder
- If lauching the applicatio fails, turn off raytracing mode by default and check if the rasterization works well
- If only raytracing mode fails, try to lower
m_maxNumBeamSamples
andm_numBeamSamples
variables ofPhotonBeamApp
class
https://github.com/donguklim/vk_raytracing_tutorial_KHR/tree/master/photon_beam
The vulkna implementation is made with Nvidia raytracing sample code as base.
-
- Jensen, Henrik. (2001). A Practical Guide to Global Illumination using Photon Maps.
-
- Derek Nowrouzezahrai, Jared Johnson, Andrew Selle, Dylan Lacewell, Michael Kaschalk, Wojciech Jarosz. A programmable system for artistic volumetric lighting. ACM Transactions on Graphics (Proceedings of SIGGRAPH), 30(4):29:1–29:8, August 2011.
- Wojciech Jarosz, Derek Nowrouzezahrai, Iman Sadeghi, Henrik Wann Jensen. A comprehensive theory of volumetric radiance estimation using photon points and beams. ACM Transactions on Graphics (Presented at SIGGRAPH), 30(1):5:1–5:19, January 2011.
-
"Introduction to 3D Game Programming with DirectX 12" book - Sample codes in
Common
folder.- Common/ - The original codes have been modified.
-
tiny gltf -
stb_image.h
,stb_image_write.h
,json.hpp
,tiny_gltf.h
-
Microsoft DirectX Samples - DirectXRaytracingHelper.h DXSampleHelper.h