Final Project Report
CSS 552 – Prof. Sung
Huaming Chen,Michael Tanaya
Mar 1, 2016

Contents

Problem Statement

Current System uses global ray tracing to calculate reflection and refraction. However, it's very expensive. For complex curved surfaces, we have to go through expensive ray tracing and/or lighting calculation.

Solutions

Rather than using ray tracing, we decide to use cube mapping to present reflection. The basic princlple of cube mapping is creating 6 cameras around object and toward 6 directions. By pre-computing the images of these cameras, we can directly using these images as the texture to present reflection.

For our CSS 552 final project, we implement a new texture class, called cube. It can present reflection color by looking up textile in 6 pictures. Then we implement a new function to compute 6 pictures for texture_cube. It based on threads, so we can compute 6 pictures at same time. Besides, in order to make sample evenly, we implemented a new function to convert coordinate from rectangle to sphere.

Examples

Example 1

compare between cube mapping and ray tracing reflection. The size of picture is 300*300.

CubeMapping RayTracing

Example 2

compare between 2 cube mapping. The size of first is 100*100, second is 300*300.

CubeMapping_100 CubeMapping_300

Example 3

compare between our cube mapping with cube mapping based on openGL. The size of picture is 300*300.

Our program openGL

References