Git Product home page Git Product logo

pathtracer's Introduction

Pathtracer

This project started as a playground and implementation of light transport theory and concepts in the form of a unidirectional pathtracer. It is currently a Work In Progress, with a lot of features to work on still.

Current list of features:

  • Physically based BRDFs (Lambertian, Oren-Nayar, Specular (GGX))
  • Naive BRDF sampling
  • NEE (Next Event Estimation / Direct light sampling)
  • MIS (Multiple Importance Sampling between Naive and NEE)
  • OpenGL Compute Shader implementation (OpenGL 4.6 Core, GLSL)
  • Custom-made BVH implementations using Sweep SAH split
  • (WIP) glTF model loading and material creation
  • CMake build that supports Windows (MSVC, Clang for Windows) and Linux (GCC, Clang)

Results and renders (From earliest render to current day):

Very early result using a purely Lambertian BRDF and naive hemisphere sampling naive_lambertian

First tests of MIS between Naive and NEE mis

MIS (Naive+NEE), Modified Blinn-Phong, Sweep SAH BVH bvh

Specular BRDF (GGX NDF with Smith geometry func.), using GGX importance sampling - Metallic Gold material specular

(WIP) glTF Model support gltf

Third-party libraries used:

  • cgltf (GitHub)
  • PCG Random Number Generation Library (Minimal C Edition) (GitHub)
  • GLAD - Multi-Language OpenGL Loader-Generator (GitHub)
  • Simple DirectMedia Layer 2 - SDL2 (GitHub)
  • stb libraries (GitHub)
  • glm (GitHub)

To-Do List:

  • Shader includes (Preprocess shaders and copy/paste included shaders)
  • Optimize BVH traversal
  • Multiscattering approximation for Oren-Nayar BRDF
  • Separate different estimators (BRDF-only, NEE-only, MIS) into different compute shaders
  • Implement more variance reduction techniques (stratified sampling, BRDF sampling, low discrepancy sequences).
  • Russian Roulette
  • Measuring different radiometric quantities (for example intensity, to get an orthographic projection)

pathtracer's People

Contributors

limepixl avatar

Stargazers

Stojanov avatar  avatar Martin Gerhardy avatar Jan van Bergen avatar

Watchers

James Cloos avatar  avatar

pathtracer's Issues

MIS: Trowbridge-Reitz NDF causing fireflies

When not using importance sampling for T-R NDF, the calculations cause fireflies which are either caused by the NDF itself being wrong, or multiple importance sampling not handling it correctly. Most probable is that the MIS weights are wrong.

Overhaul handling of glTF node transformations

Currently the way the node transformations are handled when loading glTF models is incorrect. Only the root node's transformations are considered, and all of the primitives are transformed accordingly, instead of transforming primitives only within specific nodes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.