CS 5610/6610 - Spring 2021 - Interactive Computer Graphics
Project 6 - Environment Mapping
In this project we will implement simple environment mapping. This will include both the background and the reflections on objects.
Requirements
Your program must take the name of the .obj file as its first command-line argument.
The files for the cube-map images forming the background and the reflection environment can be hard-coded.
You can use this cube-map image set for your tests. It is recommended that you use the y-up convention for this project, since this cube-map assumes y-up.
Step 1: Display the background
Draw a cube centered at the camera position. You can use this cube.obj file for the cube or hard-code its vertex positions.
Writing to the depth buffer must be disabled while drawing the cube.
Map the cube-map enviroment onto the cube, such that rotating the camera properly rotates the texture on the cubemap, producing an illusion of an environment.
Step 2: Reflections on a sphere
Spheres are useful for debuging reflections. You can use this sphere.obj file for your tests.
The sphere must display reflections of the environment texture.
The reflections msust match the orientation of the camera.
An example view of a sphere with reflections.
Step 3: Reflections on objects
The final reflections must be combined with Blinn shading.
Reflections combined with Blinn shading.
The reflections should be properly displaed on the given obj file. You can use this teapot.obj file for your tests, which includes a teapot model oriented such that y-axis is aligned with the up direction.
Reflections with Blinn shading on a teapot.
Additional Requirements for CS 6610 Students
Draw a plane with environment reflections underneath the object.
Teapot with a plane.
Use render-to-texture operations to produce the reflection of the teapot on the plane.