Skip to content

111116/toyray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toyray

Build Status

a naive path tracer.

poster

See gallery for scene credits.

Compile and Run

mkdir build
cd build
cmake ..
make -j
./toyray

Implemented functions

shape types:

  • triangle
  • triangle mesh
  • sphere
  • infinite plane
  • square
  • cube
  • transformed geometries
  • alpha-masked geometries
  • bump-mapped geometries

materials:

  • lambert reflective
  • lambert transmissive
  • mirror
  • conductor (smooth / rough)
  • dielectric (smooth)
  • plastic (smooth / rough)

light types:

  • diffuse area light
  • point light
  • directional light
  • constant environment light
  • environment map (light probe)

samplers

  • std::mt19937

input format:

  • shapes: Wavefront OBJ (ASCII)
  • scene configuration: Tungsten styled JSON
  • light probe / texture: EXR, HDR, PNG, JPG

output format:

  • EXR
  • BMP

Other notes

This renderer is neither reliable or efficient. If you are looking for open-source renderers, check out Mitsuba, PBRT, Tungsten...

If you decide to learn path tracing by reading this code, I recommend start by looking at the path tracing core src/renderer.cpp.

Scenes are available at toyray-scenes made by other artists, mostly converted by Benedikt Bitterli.

About

naive pure c++ path-tracer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published