minimal but extensible header only implementation of photon mapping in C++

Overview

photon_mapping

minimal but extensible header only implementation of photon mapping in C++.

Features

  • Direct illumination with explicit light sampling
  • Indirect illumination with final gathering
  • Caustics photon map
  • Reference path tracing integrator
  • Load obj model

Requirements

Build

CMake option Description
BUILD_TESTS build tests
git submodule update --init
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Run

place obj model under build and run

./examples/main

Structure

Name Description
include/camera.h ray generation from camera
include/core.h basic data types
include/image.h image
include/integrator.h implementation of photon mapping, path tracing(for reference)
include/light.h light
include/material.h implementation of BRDF, BTDFs
include/photon_map.h implementation of photon map with kdtree
include/primitive.h primitive
include/sampler.h random number generation, sampling utilities
include/scene.h ray-scene intersection, model loading
include/triangle.h point sampling on a triangle

Gallery

Cornell box without final gathering

Parameter Value
number of photons 1000000
number of nearest neighbors 100
number of samples 100
final gathering false

Cornell box with final gathering

Parameter Value
number of photons 1000000
number of nearest neighbors 100
number of samples 100
final gathering true

Cornell box with mirror spheres

Parameter Value
number of photons 1000000
number of nearest neighbors 100
number of photons for caustics photon map 1000000
number of samples 100

Cornell box with water

Parameter Value
number of photons 100000
number of nearest neighbors 100
number of photons for caustics photon map 10000000
number of samples 256

This model is available under models/

Externals

References

You might also like...
A simple, generic, header-only state machine implementation for C++.

Finite State Machine for C++ A simple, generic, header-only state machine implementation for C++. Documentation Please see the documentation in fsm.h

Jimp-native is a fast C++ re-implementation of Jimp with zero system dependencies and minimal overhead!

Jimp native Make your sever-side Jimp code run 10x faster! Jimp-native is a fast C++ re-implementation of Jimp with zero system dependencies and minim

Minimal-ish implementation of Unreal Online Subsystem + ImGui UI

Minimal-ish implementation of Unreal Online Subsystem + ImGui UI

A minimal implementation of a task-switching kernel in C for the ATmega328P chip

Multi-tasking Kernel for ATmega328P This repo includes a simple multi-tasking kernel, allowing the registration and execution of multiple tasks. In de

A minimal Z80 implementation.
A minimal Z80 implementation.

tinyz80 A minimal Z80 implementation. Running the examples. Compile the desired file in src to build a version of the raw emulator (located in z80.c)

Minimal implementation of malloc and free for demo purposes.
Minimal implementation of malloc and free for demo purposes.

Minimal implementation of malloc and free using sbrk() and brk() system calls. Context: How does a process actually request the kernel to allocate/dea

LVI-SAM: Tightly-coupled Lidar-Visual-Inertial Odometry via Smoothing and Mapping
LVI-SAM: Tightly-coupled Lidar-Visual-Inertial Odometry via Smoothing and Mapping

LVI-SAM This repository contains code for a lidar-visual-inertial odometry and mapping system, which combines the advantages of LIO-SAM and Vins-Mono

A Multi-sensor Fusion Odometry via Smoothing and Mapping.
A Multi-sensor Fusion Odometry via Smoothing and Mapping.

LVIO-SAM A multi-sensor fusion odometry, LVIO-SAM, which fuses LiDAR, stereo camera and inertial measurement unit (IMU) via smoothing and mapping. The

Contour mapping and 3D surface modeling app
Contour mapping and 3D surface modeling app

QuikGrid v5.4 for 64-bit editions of MS Windows Contour mapping and 3D surface modeling app A 64-Bit Windows installer for QuikGrid can be found in th

Owner
yumcyawiz
Master student. I am interested in Computer Graphics, Machine Learning and Mathematical Finance.
yumcyawiz
Volumetric progressive photon mapping written in C++.

volppm Volumetric progressive photon mapping written in C++. WIP. Features Homogeneous medium Hero wavelength sampling for chromatic absorption/scatte

yumcyawiz 34 Sep 17, 2022
Photon OS DPDK and Packet Generator, RT Test, TF2 docker image.

photongen Photon OS DPDK and packet generator , cyclictest , TF2 with CUDA docker image. DPKD libs The build proccess builds and installs all shared l

spyroot 5 Sep 13, 2022
A Minimal, Header only Modern c++ library for terminal goodies 💄✨

rang Colors for your Terminal. Windows Demo Example usage #include "rang.hpp" using namespace std; using namespace rang; int main() { cout << "P

Abhinav Gauniyal 1.3k Dec 30, 2022
A minimal header-only audio synthesis and processing library

Aurora A minimal header-only C++ audio synthesis and processing toolkit. Getting Started Aurora is a collection of header files which can be included

null 11 Sep 26, 2022
Minimal freestanding C library for kernel dev. Think Rust's libcore but for C. (memutils, string formatting, etc)

Libcore Minimal freestanding C library. Features String formatting. Memory utils memcpy memmove memcmp String utils strlen strncpy strncmp Serial driv

Anthony 3 Oct 21, 2021
The whole design is modular, parametric (cost and others), field repairable, and super extensible

Easy-Transceiver The whole design is modular, parametric (cost and others), field repairable, and super extensible. It is almost trivial to add suppor

Dhiru Kholia 8 Oct 2, 2022
A sketch that not only parses NMEA sentences, but also allows sending UBX commands and decrypt answers from the ublox module

RAK4631-ublox-Commander This is a tokenizer and parser for raw NMEA sentences. This is not intended (yet anyway) for production, but as an exercice in

Kongduino 2 May 29, 2022
A very minimal & simple text editor written in C with only Standard C Library.

Texterm Text Editor A very minimal & simple text editor written in C with only Standard Library. Syntax highlighting supported for C JavaScript Python

Biraj 40 Dec 8, 2022
Header-only VMWare Backdoor API Implementation & Effortless VMX Patcher for Custom Guest-to-Host RPCs

VmxHijack Header-only VMWare Backdoor API Implementation & Effortless VMX Patcher for Custom Guest-to-Host RPCs Sample // --- RPC Server Code (VmxHija

null 27 Sep 9, 2022