2019-09-23 23:39:07 +01:00
2019-08-20 22:36:57 +01:00
2019-09-23 23:36:33 +01:00
2019-09-21 21:53:14 +01:00
2019-09-21 21:53:14 +01:00
2019-08-20 22:36:57 +01:00
2019-09-09 22:42:54 +01:00
2019-09-19 00:18:17 +01:00
2019-07-17 01:22:13 +01:00
2019-09-23 23:39:07 +01:00

Inferno Pathtracer

Build Status

Inferno is a CPU Only, progressive unidirectional pathtracing engine written in C++.

Latest Render

Features

  • Supports OBJ Files
  • Supports many material properties
  • Uses multiple types of acceleration structures
  • Fully capable GUI adds much runtime customization to the scene and render settings
  • Custom threadpool for best performance

Installation

git clone https://github.com/plane000/inferno
cd inferno
mkdir build
cd build
cmake ..
make

Examples

There are many example scenes that I have made already. Just change the CurrentTest variable inside the CMakeList to the name of the file you wish to demo.

Basic Scene

The basic use of the API is demonstrated below. More documentation will come once the project is more mature.

#include "../src/inferno.hpp"

static const int width = 1000;
static const int height = 1000;

int main(int argc, char** argv) {
      InfernoEngine inferno;

      inferno.SetMode(MODE_OPERATION_PROGRESSIVE_GUI);

      inferno.InitWindow(width, height);
    
      Scene* scene = new Scene(width, height);
      scene->sky = new SolidColourSky({ 0.0f, 0.0f, 0.0f } 0.0f);
      scene->camera = new Camera(width, height);
	
      // Light
      Sphere light({ 35.0f, 56.0f, 25.0f }, 35.0f, new Material({ 1.0f, 1.0f, 1.0f }, 0.0f, 5.0f));
      scene->objects.push_back(&light);
	
      Sphere sphere({ 0.0f, 0.0f, -8.0f }, 1.0f, new Material({ 0.817f, 0.374, 0.574 }, 0.5f));
      scene->objects.push_back(&sphere);

      Plane plane({ 0.0f,-1.0f, 0.0f }, { 0.0f, -1.0f, 0.0f }, new Material({ 0.9f, 0.9f, 0.9f }, 0.0f));
      scene->objects.push_back(&plane);

      inferno.SetScene(scene);

      inferno.Ready();
      inferno.Render();

      return 0;
}

Example Render

References

While programming this I found a few resources especially useful. Below is some listed.

Samples

Stanford Dragon Stanford Dragon Cornell Box Specular Materials Cornell Box Cornell Box No Colours

Description
Inferno v2.0 - A naive pathtracer
Readme MIT 88 MiB
Languages
C++ 85.6%
C 14.3%
CMake 0.1%