Part 1: Scene Geometry


The foreground is a model consisting of 1988 vertices and 1900 polygons modeled using Wings3D. It was exported from Wings as a single OBJ format file and loaded using the OBJ loader library.

Here is the triangulated wire-frame drawn by the demo.

Finally, here is the textured geometry. Most of these textures were taken from NVIDIA's Transmogrifying Textures Volume 1. Other textures, including the content of the billboard itself, were generated using The GIMP.

This is our starting point. Our task now is to put this into context and make it look good.

One aspect of the foreground geometry worth pointing out is the wire running to the power pole. This is represented by a single large flat polygon with a mostly-transparent texture applied. This geometry is visible in the Wings screen shot, but has alpha-tested away in the demo screen shot.


The background is a model consisting of 192 vertices and 255 faces. It too was modeled with Wings and loaded using the OBJ library.

The background uses a modern twist on the forced perspective. The geometry itself is just a tiny pie-crust of crumpled vertices. When rendered, it is transformed such that it always remains centered about the viewer. Its contribution to the depth buffer is discarded, as it can always be assumed to be farther away from the viewer than anything else. These two techniques combine to provide the illusion that the background is always extremely far away, regardless of the view position.

Here we see the foreground overlaid atop the background. A fog effect is applied to the background using the OpenGL fixed function pipeline. This simulates the atmospheric in-scattering that occurs when viewing objects at a distance, and lends the mountains of bit of purpleness and majesty.


We have 4 light sources in our scene. The sun is a bright white directional light source and the moon is a pale blue directional light source. In addition, two dim yellow point light sources are positioned inside the foreground's lamp shade geometry. Three of these light sources, the sun and the two bulbs, are enabled in the above screen shot. This is entirely the OpenGL fixed function pipeline at work, so things look a little bland.

[Introduction] [Part 1: Scene Geometry] [Part 2: Day and Night Skies] [Part 3: Illumination] [Part 4: Added Detail]