A simple 3D Render engine built from scratch using nothing but C++ with SDL2 and Maths. The program reads an object file in obj format, and an optional material file in mtl format and renders the scence with added orbit controls and lighting/shadow options.
Make sure you have SDL2 installed
clone the repo. Run the following commands
cd SimpleRenderer
Put [yourobject].obj and [yourobject].mtl files in this folder
Rename [yourobject] -> cornell-box
make
- use arrow keys to move the camera around
- use x,y to rotate the camera in the x,y axis respectively
- lighting options only available in ray tracing mode(comment out drawRayTracing() on line 722)