By: Justin Kehl
I wanted to implement a birdwatching application for my final project because
I like birds and enjoy birdwatching. Towards this goal I created and animated one
type of bird (affectionately called tall-birds) and then built an open world with
trees and bushes placed randomly around the world. I wanted the user to be able to
roam through the world looking at birds in the trees, so I made the camera free and
also gave the user a pair of binoculars with zoom functionality to allow them to better
view birds at a distance. I made my world look a bit more realistic by applying textures
to the grass, bushes, and trees, constructing the birds and binoculars out of various
different materials, and lighting the whole scene to simulate outdoor morning light.
- W - Walk forward
- A - Walk left
- S - Walk backward
- D - Walk right
- Spacebar - Hold to raise binoculars
- Movement - Look around the world
- Scrolling - Once binoculars are up, zoom in and out
- Textures - Grass, bushes, and tree bark
- Materials - All parts of birds, binoculars
- Lighting - Point lighting positioned to simulate outdoor morning light
- Hierarchical Modeling - Bird modeled with body as base, birds and bushes placed around trees
- Animation - Bird wings flap
- Field of View/Perspective - Zoom effect on binoculars
- Free Camera - Able to move and look around the world
Bird building and positioning
- I started by creating a blank world with a fixed camera, point light, grass, and sky.
I then built a single tall-bird using hierarchical modeling. Once the bird was complete I
animated its wings and improved its appearance by altering the materials used for each piece.
With the bird complete, I found a texture-mapped tree obj, placed it in my world, and chose an
appropriate bark texture. I then placed four copies of tall-birds in various positions around
the tree and set out to fill the world with trees.
Tree placement around the world
- I chose to randomly generate tree position using the rand() function seeded with time.
I generate an x, z, and rotation degree to place the tree at a specific point near the
center of the world with a given rotation. Birds are then "toggled" into each tree based on which
tree is being rendered. This produces the nice effect of some trees being completely empty while
other trees have up to four birds. With the tree locations being random, they sometimes group into
small groves with varying numbers of birds which adds to the sense of randomness. Bushes were also
added in relation to the trees to give the landscape a little more texture and interest.
- With a world full of trees and birds, I set out implementing binoculars. To do this I found a
binocular obj, placed it directly below the camera, and made the spacebar rotate the binoculars up.
I also modified the binocular vertex shader to ignore the camera position so the binoculars move "with"
the user as they move throughout the world. To simulate looking through the binoculars, I enclosed the
camera in a thin cube that renders black, but discards all central pixels and only render this cube when
the binoculars are fully raised. The last feature I wanted to add was a zoom effect. I implemented this
by binding the mouse scroll wheel to the Field of View argument of the perspective matrix. When the
binoculars are raised, scrolling the mouse wheel forward/backward decreases/increases the Field of View
resulting in a larger/smaller rendered image. To keep the view sensitivity consistent, I made the pitch
and yaw camera motion (looking side to side) scale according to the level of zoom.
Initial view of the world
Binoculars being raised
Looking through the binoculars
Slightly zoomed in using the binoculars
Fully zoomed in using the binoculars
Closeup of the bark, bush, and grass textures used