manas96 / Raytracer

A backwards raytracer built for learning purposes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raytracer

A (backwards) raytracer I wrote for learning.

Glass teapot with metallic spheres

References used :

TODO :

  • Implement Bounding Volume Hierarchies.
  • Parallelize.
  • Study PBRT's architecture.
  • Implement a smarter parallelization strategy.
  • Investigate visual artifacts: Insufficient sampling? Inaccurate normals? Improper texture mapping?
  • Use Intel's Open Image Denoiser.

Features:

  • Real time display for image that's being traced
  • BVH
  • (Naive) parallelization
  • Triangle primitives
  • OBJ geometry loading
  • (Naive) MTL file loading

More example output:

Glass teapot

There are a few visual artifacts in these images, especially with the teapot normals. However, they do demonstrate geometry mesh loading.

Real time display

This demonstrates that the current parallelization strategy is not ideal. The top thread finishes its work quickly(since there are no objects to intersect near the sky) and then does nothing, wasting compute. A better solution would be to have a worker-assigner model, where a taskmaster assigns free worker thread an area of the scene to render. As soon as a worker is finished, it indicates this to the taskmaster who can then assign more work.

Sphere and triangle primitives

Spheres and triangles The red triangle is blurry because of a narrow depth of field.

Build instructions for Windows:

./premake5.exe vs2019

About

A backwards raytracer built for learning purposes.


Languages

Language:HTML 82.4%Language:C++ 15.4%Language:JavaScript 1.6%Language:Objective-C 0.2%Language:CSS 0.2%Language:CMake 0.1%Language:C 0.1%Language:Lua 0.0%