Description

A river rafting through beautiful Yosemite Valley implemented in OpenGL.

Controls

Features

Blinn-Phong Lighting

Blinn-Phong Lighting employs the fragment shader to calculate the necessary color for each fragment. By providing a light source and the object's coefficients for ambient, diffuse and specular lighting, we are able to simulate how light reflects a given surface.

Hierarchical Modeling

Hierarchical modeling allows us to move shapes around with respect to an arbitrary frame. This makes it less difficult to implement translations and rotations around joints.

Camera Control

The camera is fixed on the ocean floor and allows the user to walk and look around using the standard WASD keys and mouse pointer, similar to most first person interactive 3D games.

Cubemap

Also referred to as a skybox, a cubemap renders a 3D cube that the camera is wrapped around in. By removing the camera translation and keeping the view matrix, the cubemap will only move with respect to the mouse pointer, without the WASD keys. The textures mapped on the cube appear to be seamless and look infinitely far away because of how it ignores the camera translation.


Textures

Texture mapping allows the object meshes to be wrapped using selected image files. In addition to Blinn-Phong lighting, textures add more realism to an object.

Bezier Curve

The Bezier Curve I implemented consists of a list of points and interpolates between the three points, and generates a smooth curve between them. This curve allows for more organic movement and tanslation of objects in the world.


Collision Detection

I've implemented sphere on sphere collision detection between the raft and the rocks, which will prevent the raft from moving in the direction of the sphere as it gets too close. I have also implemented some sort of collision detection between the raft in the Bezier curve, where the raft cannot stray too far from it's designated path.

Resources