Author: Diego Batres
This program renders 3D objects as .ppm images by specifying a driver file with the camera position, image frame, resolution, recursion level (reflections), light sources, and objects (models and spheres). Supports object smoothing, shadows, reflections, refraction (spheres), multiple materials, and transformations.
-
Prerequisites:
- Clone this repository.
- Install the Eigen C++ library in the same folder.
- Move mtl, obj, and driver files to main folder.
-
Compiling the program:
make: build executablemake clean: remove object files
-
Running the program:
- Usage:
./raytracer [driver file] [output file] - Example:
./raytracer driver00.txt driver00.ppm
- Usage:
-
Driver Files:
driver00.txt: 6 spheres (2048x2048)driver01.txt: 4 spheres, board.obj (2048x2048)driver02.txt: 23 spheres, 2 x cat.obj, 2 x checker.obj, 11 x board.obj (2048x2048)driver03.txt: 8 spheres, cat.obj, wolf.obj, icosphere.obj (2048x2048)driver04.txt: deer.obj, 3 x icosphere.obj (2048x2048)
-
Input Files:
*.obj: object files*.mtl: material files
-
Source Files:
Light.*: light objectMakefile: makefileModel.*: model objectMaterial.*: material objectraytracer.*: rendering, main methodSphere.*: sphere objectRay.*: ray objecttransform.*: transform functions




