paoptu023 / COMS4160

For COMS4160 Computer Graphics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ray Tracer

A ray tracer starting from scratch in C++.

Features:

  • points, vectors, spheres, triangles, planes
  • point, ambient, and area light sources
  • blinn-phong shading model
  • diffuse and reflective materials
  • triangle meshes (obj file format)
  • axis-aligned bounding boxes and bvh trees for acceleration
  • jittered monte-carlo antialiasing (smooth edges and soft shadows)
  • hdr format (.exr)

To compile:

  • mac: g++ -O2 *.cc -I. -I/usr/local/include/OpenEXR -lIlmImf -lImath -lHalf -Wall -o raytra
  • linux: g++ -O2 *.cc -I. -I/usr/include/OpenEXR -lIlmImf -lImath -lHalf -Wall -o raytra

To run:

  • ./raytra [scenefile.txt] [output.exr] [PRIMARY_NUM] [SHADOW_NUM]

About

For COMS4160 Computer Graphics.


Languages

Language:C++ 96.5%Language:GLSL 1.8%Language:C 1.5%Language:Shell 0.1%Language:Batchfile 0.1%Language:Python 0.1%