All Projects → Andrew-Helmer → pmj-cpp

Andrew-Helmer / pmj-cpp

Licence: MIT license
"Progressive Multi-Jittered Sample Sequences" in C++

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to pmj-cpp

Raytracer
a simple RayTracer based on the Monte Carlo Path Tracing
Stars: ✭ 14 (-58.82%)
Mutual labels:  rendering, raytracing
fluctus
An interactive OpenCL wavefront path tracer
Stars: ✭ 55 (+61.76%)
Mutual labels:  rendering, raytracing
Gears Vk
Powerful low-level C++20 rendering framework for Vulkan 1.2, including Real-Time Ray Tracing (RTX) support, built atop Auto-Vk.
Stars: ✭ 71 (+108.82%)
Mutual labels:  rendering, raytracing
photon mapping
minimal but extensible header only implementation of photon mapping in C++
Stars: ✭ 65 (+91.18%)
Mutual labels:  rendering, raytracing
Python Raytracer
A basic Ray Tracer that exploits numpy arrays and functions to work fast.
Stars: ✭ 204 (+500%)
Mutual labels:  rendering, raytracing
Edxray
A physically based renderer which implements many state of the art techniques in light transport simulation, material modeling, sampling and reconstruction.
Stars: ✭ 270 (+694.12%)
Mutual labels:  rendering, raytracing
Monte carlo ray tracer
A program with an implemented Monte Carlo Ray Tracer algorithm for global illumination of a virtual 3D scene.
Stars: ✭ 90 (+164.71%)
Mutual labels:  rendering, raytracing
Fall2021
Base repository for Dartmouth's CS87/287 (Fall 2021).
Stars: ✭ 43 (+26.47%)
Mutual labels:  rendering, raytracing
Ssrt
Real-time indirect diffuse illuminaton using screen-space information for Unity.
Stars: ✭ 176 (+417.65%)
Mutual labels:  rendering, raytracing
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+6008.82%)
Mutual labels:  rendering, raytracing
CLUSEK-RT
Vulkan based C++ ray-tracing game engine.
Stars: ✭ 24 (-29.41%)
Mutual labels:  rendering, raytracing
C-Raytracer
A CPU raytracer from scratch in C
Stars: ✭ 49 (+44.12%)
Mutual labels:  rendering, raytracing
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+591.18%)
Mutual labels:  rendering, raytracing
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+11579.41%)
Mutual labels:  rendering, raytracing
pathtracer-webgl2
Path tracing render engine for the web. Both ray tracing for conventional 3d models and ray marching for fractals implemented. Built with WebGL 2 and Angular 2.
Stars: ✭ 45 (+32.35%)
Mutual labels:  rendering, raytracing
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (+129.41%)
Mutual labels:  rendering, raytracing
Messier87
A realtime raytracing blackhole renderer
Stars: ✭ 53 (+55.88%)
Mutual labels:  rendering, raytracing
DuEngine
An efficient interactive C++ renderer for ShaderToy-alike demos with 2D/3D/CubeMap/Video/Camera/LightField/Volume textures. (Partially used in my I3D 2018 papers)
Stars: ✭ 62 (+82.35%)
Mutual labels:  rendering, raytracing
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+6200%)
Mutual labels:  rendering, raytracing
Photon-v2
A program that takes photographs of a virtual world.
Stars: ✭ 75 (+120.59%)
Mutual labels:  rendering, raytracing

Progressive Multi-Jittered Sample Sequences

This is a C++ implementation of Progressive Multi-Jittered Sample Sequences (in 2D), based off two papers:

Much thanks to Per Christensen and Matt Pharr for help and encouragement with this implementation.

For a Rust version, see Simon Brown's implementation. Simon had a key insight on how to optimally pick subquadrants during sample generation, which improved the quality of the sequences generated by this code.

These sample sequences are really great for certain types of Monte Carlo integration problems, especially for use in computer graphics rendering. Here's one such sequence, with a subdividing grid to illustrate the most basic progressive stratification.


Generated with this Colab notebook

Using the Sample Sequences for Rendering

See the Sample Usage Documentation. Also provided are some precomputed sample sequences in the sample_sequences directory, so you don't even need to run any of this code.

Using the Code (Building and Generating Your Own Samples)

To generate a set of samples you can build the generate_samples tool with make.

make release

And then run generate_samples.

./generate_samples --n=4096 --algorithm=pmj02 --out=$PWD/pmj02_samples.txt

See the Code Usage Documentation for more information on usage.

Sequence Properties and Convergence

The PMJ(0,2) or pmj02 sample sequence has the property that any prefix of the samples are stratified on every elementary base-2 2D elementary interval. For example, for 16 samples, these sequences are always stratified on the 16x1, 8x2, 4x4, 2x8, and 1x16 grids.

This yields extremely good convergence on test integrals, especially at powers of two for the PMJ(0,2) sequence. Note that both uniform random sampling and best-candidate sampling converge at a rate of approximately N-.5. Refer to Christensen et al. for comparison against more sample sequences.


Generated with this Colab/Jupyter notebook

The Progressive Multi-Jittered Sequence with Blue Noise, or pmjbn, doesn't have as good convergence as pmj02, but it does have very nice blue noise properties, while still having better convergence than best-candidate sampling. This animation shows how the samples are (mostly) distributed far away from each other at any given number of samples.

Licensing

Licensed under the MIT Open Source license. See the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].