Walking Among the Clouds

Ben Woskow's Final Project

CSC 471, Introduction to Graphics

Spring 2006, Dr. Zoё Wood

Introduction

Walking Among the Clouds contains a virtual human who is able to maneuver atop a cloudy sky. My virtual human can do normal human-like things, in addition to jumping from cloud to cloud, and leaping into tornados. He is a hierarchical model, is able to complete sixteen different actions, and is texture mapped. Walking Among the Clouds is written in C and uses OpenGL and GLUT.

Email me if you want a copy of the program! It is too large to keep posted online, but I'd be happy to send you a copy if you let me know you want one.


That's me!! I'm waving to you!!

Program Usage

All possible commands are available in a menu accessible by right-clicking in the window. Left-clicking and dragging the mouse rotates the camera. Additionally, the following commands are accessible via the keyboard:
 

Animations:

  • DOWN: Jump (shorter jump)

  • DOWN+SHIFT: Jump (longer jump)

  • UP: Walk

  • LEFT: Turn counterclockwise

  • RIGHT: Turn clockwise

  • Y: Nod head "yes"

  • N: Shake head "no"

  • E: Commit an exorcism

  • R: Scratch head

  • V: Wave

  • U: Salute

  • C: Clap

  • F: Finger stretch

  • J: Jumping jack

  • K: Kick

  • L: Leap into a tornado

Camera controls:

  • A: Translate camera left
  • D: Translate camera right
  • W: Translate camera forward (zoom in)
  • S: Translate camera backward (zoom out)
  • Z: Decrease translate speed
  • X: Increase translate speed

 

Miscellaneous controls:

  • H: Help
  • Q: Quit


Gordon can jump from one cloud to another.

Hierarchical Modeling

I used GLU quadrics to hierarchically model my virtual human. The entire body consists of 89 quadrics (57 spheres and 32 cylinders), which consist of a total of 14,120 polygons. Many different forms of these quadrics were available for my modeling because I could scale and rotate them to the desired orientation. From top to bottom, the virtual human is modeled as follows:

  • Head: 1 sphere

  • Neck: 1 cylinder

  • Torso:

    • Upper torso: 1 sphere

    • Middle torso: 1 cylinder

    • Left arm:

      • Shoulder: 1 sphere

      • Upper arm: 1 sphere

      • Lower arm: 1 sphere

      • Palm: 1 sphere

      • Fingers (5x): 4 spheres and 3 cylinders each

    • Right arm:

      • Shoulder: 1 sphere

      • Upper arm: 1 sphere

      • Lower arm: 1 sphere

      • Palm: 1 sphere

      • Fingers (5x): 4 spheres and 3 cylinders each

    • Waist: 1 sphere

  • Left leg:

    • Upper leg: 1 sphere

    • Lower leg: 1 sphere

    • Foot: 1 sphere

  • Left leg:

    • Upper leg: 1 sphere

    • Lower leg: 1 sphere

    • Foot: 1 sphere

It should also be noted that within the human model, there exist 41 joints at which body parts can move. These joints allow each connected body part to rotate along an arbitrary axis.

Animation

I used GLUT timer functions to implement animation. These timer functions, which would execute at specified time intervals,
"opened" and "closed" various joints to accomplish the desired effect. For animations such as walking and jumping, the timer functions also moved the model from one location to another. Multiple animations can occur simultaneously if they do not move the same body part. For example, since jumping and walking both involve moving legs, they cannot occur at the same time. However, the human could shake his head while stretching his fingers.

The following animations have been implemented:
 

  • Jump (shorter jump)
  • Jump (longer jump)
  • Walk
  • Turn counterclockwise
  • Turn clockwise
  • Nod head "yes"
  • Shake head "no"
  • Commit an exorcism
  • Scratch head
  • Wave
  • Salute
  • Clap
  • Finger stretch
  • Jumping jack
  • Kick
  • Leaping into a tornado


Mr. Painting is doing a jumping jack right now.
 

Another cool animation is that the virtual human blinks. He blinks at a random interval (between every 0 and 5 seconds). This is also accomplished using both a GLUT timer function and texture mapping.


Mr. Painting is currently blinking.

Texture Mapping

I used texture mapping to map images to the head, neck, arms, palms, fingers, walls, and floor. The head is mapped to alternating images of a human with open eyes and then again with closed eyes (as demonstrated above). The neck, arms, palms, and fingers are all mapped to a patch of skin toned to match the face. The walls and floor are mapped to an image of clouds. I used the quadrics' built-in function to generate texture coordinates.

There are three different "personalities" which come packaged with Walking Among the Clouds. The first is Gordon Freeman (the main character of Half-Life). The second is a character I named Mr. Painting (since it is actually a painting rather than a real photo). And the third personality is the most important -- the program's creator, me!


Help!! I'm being sucked into a tornado!!

Additional Ideas

Custom Texture Mapping

The original goal of my program was to allow anyone to view what he or she would look like as a virtual human being. However, I then realized how difficult it was to produce an adequate image to texture map onto the human's face. In order for a texture mapped face to look decent, it must be "flattened on an ironing board" and then rotated 180 degrees. Nevertheless, I still wanted to give the user the option to do so. So, in order to import a fourth personality in addition to the three I included, you can issue any of the following three commands onto the command line:
 

This will start the program with a fourth personality consisting of the given face image. It will blink with the supplied blink image, and will wear the given and skin image.
human.exe FACE_IMAGE BLINKING_IMAGE SKIN_IMAGE

This will start the program with a fourth personality consisting of the given face image. It will blink with the supplied blink image, and will wear the default skin (Gordon Freeman's) since none is specified.
human.exe FACE_IMAGE BLINKING_IMAGE

This will start the program with a fourth personality consisting of the given face image. It will wear the default skin (Gordon Freeman's) since none is specified, and it will not blink at all.
human.exe FACE_IMAGE


Custom texture mapped faces should look similar to this one. Also, it must be a 24-bit .bmp with both dimensions being powers of two.
Object Collision

My project contains very simple object collision. Both the camera and the human are bounded within the cloud universe. Neither can go past the walls nor can they go beneath the ground. For both the camera and the model, I simply tested the location to where it was trying to move against the boundary of the world, and saw if it was before or beyond the boundary.

Lighting and Materials

I have two point-source lights in my world. They evenly distribute light throughout all regions. I used the quadrics' built in function to generate their normals. Also, I have specific materials which I apply to the model's quadrics to attain their desired coloring. Many of these colors can be changed by selecting new materials for the quadrics. You can change shirt color, pants color, and skin tone.

Questions? Comments?

Go for it! I'd love the feedback!