A refactored version of my first ever atempt at building a raytracer in JS, most refactors are in folder and file structure, everything else is the original code. I always wanted to dive myself into computer graphic, so this was a great challenge to begin with. All the inspiration and help comes from the famous raytracing in one weekend series. The raytracer itself is not the most efficient, there is no ray acceleration implemented (BVH - KDtree - Octree) and its running in nodejs so that doesn't help either.
- Basic shapes (plane - sphere)
- multiple materials
- scene parser to play around easier
- slowest on the market
Clone the project
git clone https://github.com/Timur310/TSTracer.git
Go to the project directory
cd TSTracer
Install dependencies
npm install
build example scene
npm run build && node example.js
This will render the example cornellSphere scene from the example folder, the scene itself is a json file structured with settings, camera and scene objects, there is a parser file that will setup the scene ready for rendering, after that a .PPM file will be outputted with the final image