Skip to content

Simple ray-tracer (caster) for educational purposes.

Notifications You must be signed in to change notification settings

sio13/ray-tracing-kdtree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple ray-tracer accelerated using kd-tree

This project demonstrates acceleration performed by kd-tree employed for ray-tracing.

We used examples provided by this repo. Our ray-tracer accepts only triangle meshes without color and material properties. To apply on the input from the repo you need to preprocess input obj files by our processor input_transform.py. Change input filepath inside the file

file = open("data/input_obj_file")

to your filename. The output will be in output.obj. Modify accordingly. To apply ray-tracer on your file update this line in main.cpp:

ObjParser obj_parser = ObjParser("demo_data/bunny.obj");

Build and run the project:

cmake . && make && ./raytracer

with your filename.

Some of the generated models: bunny bunny bunny bunny bunny

GH link - https://github.com/sio13/ray-tracing-kdtree