User's Guide

Clouds

Program Description

This program generates clouds using Perlin noise algorithms and displays them in 3d space.

Input

The program is controlled with mouse and keyboard. The user sees the world from the first person view and can look around using the mouse. The user can strafe and move forwads/backswards using the 'w', 'a', 's' and 'd' keys.

Normal Output

A number of clouds in the sky



Exception Reports

The program doesn't generate exceptions

Program Limitations

The program doesn't take any user input, other than camera directions. Hence its limitations are built into its program code and are independent of user input. Main such limitation is a very naïve distribution of clouds in the sky.

Command Sequence

To the source files, you need two things: Boost Jam build tools and OpenGL development libraries. Jam

can be downloaded at http://www.boost.org/tools/build/v1/build_system.htm

Author Information

Name: Juozas Gaigalas
Address: 149 Battle Green Drive, Rochester, N 14624
Telephone: 724-498-5061

Technical Documentation

Clouds

Program Description

(a non-technical description is available at the top of this document)

Generated 5 octave exponentiated Perlin noise 8 bit alpha textures intended to look like clouds. Applies additional filtering to the textures to erode the sharp cut-off the perlin noise at the edges, to give natural-looking contours to square samples of noise. The program then maps these textures to a set of player-facing billboards. These billboards are moved every frame to simulate the flow of clouds in the sky.

Historical Development of Program and Current Status

This program was developed by a single individual, without formal testing.

Overall System Structure

This will probably be displayed as a UML diagram or some other pictorial representation.

Overall Program Structure




(note: this was the original design. Due to time constraints, I was not able to implement a function cloud system. In the current implementation, Scene class drives all of the clouds.

Description of Key Data Structures

Billboards are flat surfaces in 3D space that always point to the camera. Mine are implemented as triangle two triangles and a texture.

Clouds contain billboards and drive them. The difference between a cloud and a billboard is that a billboards doesn't know how to orient itself to the camera or how to place itself in 3D space – it can only draw itself. Cloud positions, however, are set as parametric coordinates on the surface of a 3d dome. Clouds then translate these coordinates into direct 3d coordinates that OpenGL uses and move billboards accordingly.

Cloud system is an unfinished class. It was indented to control the positioning of clouds (in terms of 2d parametric dome coordinates) in the sky. However, currently Scene does that job.

Scene contains all the visible objects and draws them in order.



Ground and Skydome are very simple, they contain and draw polygons that make up ground and the skydome. Skydome is generated procedurally from two predefined parameters: DOMEWIDTH and DOMEHEIGH as well as two additional parameters that describe the number of triangles to be used.