15-462 Programming Assignment 4: Procedural Modeling
Due Thursday, May 3, 23:59:59
For this project you will explore various techniques for procedural modeling
and animation. The project will involve generating procedural textures,
terrain, organic structures based on L-systems, and procedural animation
of a flock of birds. Below are some screenshots of examples to give you
an idea of the kinds of scenes you will be creating:
Simple planar fractal L-system tree.
More complex L-system tree with 3-D structure.
Required Features [100 points]
You must implement the following features:
Fractal Terrain [20 points] - Create a terrain that is 100x100 units
on the x and z axes. The goal is to generate a height map based on perlin
noise (you may utilize the example functions provided in the starter code
file "noise.h"). After generating the geometry of the terrain
procedurally, you should color or texture your terrain using a procedural
technique. Be sure to explain what you did in your "readme.txt"
Procedural Cloud Textures [20 points] - Texture the skybox with
procedurally-generated cloud textures. Think carefully about how you can
avoid artifacts at the seams of the adjacent walls of the skybox.
L-System Tree [25 points]
You are provided with an example parser for an L-system and are
asked to fill in the rendering functions. Check out
for additional information on the format and algorithm. The starter code
comes with two sample files: "oaky.lsys" and "simple.lsys"
(The two screenshots earlier on this page use them.)
It is recommended to use a simple stack-based system to recursively
render trees with fractal-like structure. The starter code provides an
almost complete implementation of this. However, feel free to implement
an L-system renderer of your own design if you wish.
Once you implement the renderer, you should create your own cool looking
tree file and submit it along with screenshots. (NOTE: please remember
to "add" and "commit" all of the files you create to your subversion repository,
and document them in your
This score for this portion of the lab will be divided into two parts:
your L-system renderer [15 points], and your custom tree file [10
BOIDS Flocking [20 points] The term BOIDS usually refers to a simulation
of a flock of flying objects. The original
implementation of BOIDS had three steering behaviors:
alignment, and cohesion. These behaviors make sure that individuals
stay with the group and move in a similar direction while maintaining a
minimum distance between their neighbors.
Some things your implementation should consider:
There is a "boid.obj" file in the starter pack which just contains,
in text, a boid's positions and faces (starting vertex index is 1). You
are welcome to reuse the parser from lab3, or create your own simple one
(we won't be grading you on any other model file). Note that boid.obj doesn't
have vertex normals, so you should reuse your code from lab1 to generate
the normals. When moving boids around, their velocities should always be
aligned with their forward direction (the "nose" of the boid).
If a BOID goes outside of the boundary of the 100x100 grid, you may want
to make the BOID "wraparound" to the other side.
Avoiding collisions with objects in the world (such as trees) is extra
credit. However, you should try to regulate a BOID's height above the terrain.
One possible way to do this is to add penalty terms to the steering (heading
direction) whenever a BOID's height becomes either too low or too high.
ReadMe [5 points]
Include a readme.txt file using this
template. Make sure to describe any extra features you implemented.
Code Quality [5 points]
Use reasonably efficient and well-written code that can easily be
Representative Pictures or animation [5 points]
Save a number of still output pictures from your program to a directory
labeled images, or output frames of an animation to a movie
Extra Credit Features [up to 10 points]
There are many possible things you can do with procedural modeling and
animation techniques. You could generate procedural wood solid textures
for your tree or its leaves, you could procedurally animate your tree to
simulate wind blowing, or have procedurally animated moving cloud textures.
For your BOIDS flock, you can implement collision avoidance so that the
BOIDS avoid the terrain, obstacles, and each other. You could implement
some additional flocking behaviors such as group following of a user-specified
path, flying in formation, or BOIDS occasionally stopping for a rest in
your tree. Be creative!
In any case, please document any additional features in your
You can find the lab 4 starter code here
The submission guidelines remain the same as the previous labs. Make sure
your project can be compiled by just going into the src
and typing make
Please include a copy of whatever models, textures, or additional
data files you use when handing in your project as it makes life a
lot easier to verify your features.