This week I experimented with fog and made some finishing touches to the Roboviewer program. Last week's fog had been in GL_LINEAR mode, so the density setting had no effect. I changed the fog mode to GL_EXP and added a feature allowing the user to change the fog density.

I also changed all the scenes so that the ground now extends to the entire width of the window. Previously, the ground looked like a strip or a runway. I did this by eliminating the left and right walls, extending the coordinates of the corners of the ground plane, and manipulating the camera coordinates.

Finally, I started experimenting with depth cueing. Depth cueing uses GL_LINEAR fog to create the illusion of an object fading into the background. The fading illusion works when the fog color is close to the background color. Setting the GL_FOG_START and GL_FOG_END parameters changes when the object starts to fade. I added depth cueing to the nova scene (the outer space background) and the scene with the plain blue background. Depth cueing is only enabled when regular GL_EXP fog is off.

Key Bindings
F1 - Changes texture or robot's torso.
F2 - Changes scene.
F3 - Toggles GL_EXP fog on and off.
f - Increases fog density. Starting density is 0.
d - Decreases fog density.
c - Toggles depth cueing on and off. Only works in the nova scene and the plain blue sky scene when q - Quits program. GL_EXP fog is off.