A Simple Spectral Renderer

Related tags

Graphics pathtracer
Overview

Simple Spectral

This is a simple multithreaded spectral pathtracer implementing the algorithm (linear combination of bases) described in our EGSR 2019 paper "Spectral Primary Decomposition for Rendering with sRGB Reflectance" [Mallett and Yuksel 2019]. Also implemented are [Meng et al. 2015], [Jakob and Hanika 2019], and a classic RGB renderer.

The spectral rendering uses hero-wavelength sampling on a simple pathtracer. Our implementation supports both the CIE 1931 and 2006 standard observers.

Setup

Dependencies are intended to be minimal and easy (with the exception of GLM, all required dependencies are included):

  • GLM (required)
  • GLFW (optional, adds windowing support)
  • lodepng (required, included)
  • [Meng et al. 2015] (required, included)
  • [Jakob and Hanika 2019] (required, included)

Setup is basic CMake:

  1. cd <path/to/>simple-spectral/
  2. mkdir build
  3. cd build/
  4. cmake ..
  5. cmake --build .

There are some handy options in "simple-spectral/src/stdafx.hpp" near the top of the file. Some parameters are only exposed this way for simplicity or performance.

Program Invocation

Usage, including command-line options, can be found by simply running the binary with no arguments.

However, for convenience, basic usage looks something like:

<binary> --scene=cornell-srgb -w=512 -h=512 -spp=64 --output=output.png --window

The available scenes are "cornell" (original Cornell box), "cornell-srgb" (adjusted materials; Figure 5.a), and "plane-srgb" (Figure 1).

Acknowledgments

We would like to thank [Meng et al. 2015] and [Jakob and Hanika 2019], both of which make their code easy to use. Also lodepng, for existing. More acknowledgments can be found within the paper.

You might also like...
A dx12 river renderer using wave particles with interactive vortices.
A dx12 river renderer using wave particles with interactive vortices.

Wave Particles with Interactive Vortices Final Result Overview In game industry water can be divided into two domains, ocean and river. This project f

A simple animation challenge made with Flutter
A simple animation challenge made with Flutter

Slide Show - Flutter Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is your fi

A C++ commandline for use in servers and chat software. Provides very simple asynchronous input/output.
A C++ commandline for use in servers and chat software. Provides very simple asynchronous input/output.

commandline A C++ commandline for use in servers and terminal chat software. Provides very simple asynchronous input/output. Supports reading and writ

Simple and efficient screen recording utility for Windows.

simple and efficient screen recording utility for Windows

A simple single point light shadow mapping with OpenGL 3.3 and C++

omni-directional-light-example Using OpenGL 3.3 with C++ Basically a single light map, no lighting model was used Usage Build the executable outside A

A simple mirror simulator made with OpenGL 3.3 and C++

Mirror-Example A simple mirror example using OpenGL 3.3 with C++. Theory It basically constructs a camera at the mirror location, by determining its v

Voxelight is a simple voxel engine/sandbox
Voxelight is a simple voxel engine/sandbox

Voxelight is a learning project, I have no prior experience with OpenGL or any other graphics API for that matter.

Simple OpenGL program to visualize point cloud.
Simple OpenGL program to visualize point cloud.

Point Cloud Viewer Simple OpenGL program to visualize point cloud. The input data files should be plain text files. screenshot on Linux: screenshot on

simple fdtd using vulkan, omp or single thread
simple fdtd using vulkan, omp or single thread

fdtd simple fdtd using vulkan, omp or single thread example how to build first clone the repo with: git clone https://github.com/nikisalli/fdtd.git up

Comments
  • Fix build on Ubuntu 18.04

    Fix build on Ubuntu 18.04

    These changes get the code building for me on stock Ubuntu 18.04 using gcc 7.4. The most invasive part is changing the SphericalTriangle class to contain the A, B and C Pos structs directly rather than in an anonymous union, which is allowed on MSVC and Clang but not GCC. Since the ABC variant of the union doesn't appear to be used anywhere this looks fine to me.

    There also appears to be a racy bug where sometimes the isnan assert in rand_toward_sphericaltri() is triggered, but I haven't been able to debug that because it's not triggered in gdb for me currently (and adding prints to check the values stops it from occurring).

    opened by anderslanglands 10
  • plane-srgb scene renders black

    plane-srgb scene renders black

    I don't know how the plane-srgb is supposed to render (I don't have access to the paper and don't see Figure 1), but for me the output is a black image. cornell-srgb renders fine though ...

    opened by wahn 1
  • Fix build on linux

    Fix build on linux

    This PR contains just the parts of the previous one that are necessary to get the code building on stock ubuntu 18.04 (and probably 16.04 as well, though I haven't tested). Note that this build will assert when rendering because of the hashing issue previously dicsussed. Once we have a decision about that I'll submit a separate PR.

    opened by anderslanglands 0
  • Fix build on Ubuntu 18.04

    Fix build on Ubuntu 18.04

    These changes get the code building for me on stock Ubuntu 18.04 using gcc 7.4. The most invasive part is changing the SphericalTriangle class to contain the A, B and C Pos structs directly rather than in an anonymous union, which is allowed on MSVC and Clang but not GCC. Since the ABC variant of the union doesn't appear to be used anywhere this looks fine to me.

    opened by anderslanglands 0
Owner
Ian Mallett
Ian Mallett
A toy renderer written in C using Vulkan to perform real-time ray tracing research.

This is a toy renderer written in C using Vulkan. It is intentionally minimalist. It has been developed and used for the papers "BRDF Importance Sampl

Christoph Peters 284 Nov 30, 2022
physically based renderer written in DX12 with image-based lighting, classic deffered and tiled lighting approaches

Features Classical Deferred Renderer Physically Based shading Image Based Lighting BRDF Disney model (Burley + GGX) Tangent space normal mapping Reinh

Alena 35 Jun 2, 2022
2D GPU renderer for dynamic UIs

vger vger is a vector graphics renderer which renders a limited set of primitives, but does so almost entirely on the GPU. Works on iOS and macOS. API

Audulus LLC 159 Nov 26, 2022
PainterEngine is a application/game engine with software renderer,PainterEngine can be transplanted to any platform that supports C

PainterEngine is a application/game engine with software renderer,PainterEngine can be transplanted to any platform that supports C

DBinary 1.6k Dec 1, 2022
work in progress 3d renderer based on sdl2

work in progress 3d software renderer based on SDL. (Only supports wireframe view for now) Building On Linux, install libsdl2 and then run the folowin

null 4 Sep 12, 2021
work in progress 3d renderer based on sdl2

work in progress 3d software renderer based on SDL. (Only supports wireframe view for now) Building On Linux, install libsdl2 and then run the folowin

Jayachandra Kasarla 4 Sep 12, 2021
Ipsys Particle System Yey letS go, very cool particle system generator and fast renderer

ipsys - Ipsys Particle System Yey letS go About Ipsys is a piece of software that focuces on running and displaying cool randomly generated particule

Anima Libera 5 May 26, 2022
A modern C++ physically based renderer

The Dakku Renderer Warning: This project is currently under developing and does not guarantee any consistency. About Dakku is a physically based rende

xehoth 6 Apr 15, 2022
Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.

pbrt, Version 3 This repository holds the source code to the version of pbrt that is described in the third edition of Physically Based Rendering: Fro

Matt Pharr 4.3k Nov 28, 2022
An immediate-mode, renderer agnostic, lightweight debug drawing API for C++

Debug Draw An immediate-mode, renderer agnostic, lightweight debug drawing API for C++. License This software is in the public domain. Where that dedi

Guilherme Lampert 452 Nov 26, 2022