Skip to content
Simple, quick'n dirty, pathtracer
C++ C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
.gitignore
CImg.h
CMakeLists.txt
Geometry.cpp
Geometry.h
MERLBRDFRead.cpp
MERLBRDFRead.h
PointSet.cpp
PointSet.h
README.md
Raytracer.cpp
Raytracer.h
Raytracer.sln
Raytracer.vcxproj
TriangleMesh.cpp
TriangleMesh.h
Vector.cpp
Vector.h
chrono.h
fluid.cpp
fluid.h
hdrloader.cpp
hdrloader.h
hdrwriter.cpp
hdrwriter.h
mainApp.cpp
mainApp.h
nanoflann.hpp
stb_image.h
stb_image_write.h
utils.cpp
utils.h

README.md

pathtracer

Minimalist Quick'n Dirty Path Tracer. (almost) No keyboard needed, just drag'n drop files.

Supports:

  • Phong BRDF model ; some defaults materials from Ngan's fits
  • Environment maps
  • Normal maps, Alpha maps, textures for Albedo, Specular Ks, Shininess, Refraction, Refraction Index
  • OBJ (with materials) and VRML import, XYZ import for point clouds (can also estimate normals)
  • Display of edges, supports non-triangular faces
  • Topological information
  • Filtering, DoF, one spherical light source, Fresnel reflection on transparent objects.
  • Rendering for lenticular images (can buy sheets at vuethru.com or dplenticular.com)
  • Limited and buggy support of fog.
  • Some support for integrating photos (background photo, "ghost" objects that receive shadows and indirect light but are not displayed)

Compilation:

  • Dependency: Only wxWidget 3.1.0 (to download), CImg (included) and Nanoflann (included)
  • Windows: use .sln solution for Visual Studio.
  • Linux/MacOS: use CMake, should work too.

Usage:

  • Drag'n drop OBJ, VRML, XYZ files onto window
  • Mouse down (left, middle, right) for camera control, mouse wheel for moving forward
  • Click to select object ; see the cursor depth in the status bar (useful to change the focus distance)
  • Shift+Mouse to move/rotate currently selected object
  • Drag'n drop texture files or envmap files onto their slot on the right panel, or use the popup menu to change their values.
  • If materials are changed, they can be re-exported into a new .MTL file (menu File)
  • Menu Info gives topological info on the currently selected mesh (only works for meshes, not point clouds nor the default parametric geometries)
  • Scene can be saved in an .scn file

Images:

2.5 million triangles (src) 2.5 million triangles (src) 2.5 million triangles, entirely transparent (src)
1.8 million triangles (src) 1.6 million triangles (src) 3.1 million triangles, includes transparency (src)
133 k triangles (src) 260 k polygons (src) 1.8 k triangles + normal map (src)
23.7 million triangles (src) 1.8 million triangles (src) 2.5 k polygons + normal map, alpha map and edges display (src)
240 k triangles (src) 4.5 millions points Point Cloud Lenticular images
Lion on a ghost plane + Background photo
You can’t perform that action at this time.