Skip to content
This repository was archived by the owner on Nov 13, 2020. It is now read-only.

RixArchived/RayTracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayTracer

Ray Tracer written in C++ with only GLM lib (No OpenGL or other libraries).
(GLM lib is used for matrix operations)
Program Last modified: 2019-03-18

Authors

Vince Li
Rix Lai

How it works

This program reads an input file that contains details of each objects.
For instance, material property (specular, shininess, ambient, diffuse),
location of the objects (before trasnformation), transformation (scale, rotate, translate),
light sources, image dimension and eye location.

The program perform ray tracing by shooting ray from eye, and compute color based on
object intersection. In our implementation, each pixel on the image is computed by
one corresponding ray. We have also implemented recursive ray tracing for computing
reflections.

To accelerate our computation, we have implemented a basic uniform grid acceleration
structure. We partition the space by uniform grids and maintain a list of object that
intersects with each of the grids. We have used unordered map to enable quick lookup from
coordinate(grid) to the the corresponding list of objects. As the rays progress through space,
we check for the intersecting grid and its objects. This provides significant speed up for scene 7.
Scene 7's render time reduces from 1 hour to 15 minutes.

Where is the code

We do not have the permission to publish our code because of course policy.
However, we are able to publish the images we have rendered. The input files
are given from CSE 167 course at UCSD.

Images

scene4 scene5 scene6 scene7

About

Ray Tracer written in C++ with only GLM lib (No OpenGL or other libraries)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors