Main / Project210/21/2009 Some little things that people noticed:
10/19/2009 - A clarification: When I refer to "camera control code" I am refering to the thing that spins the world around in "world" view mode. What you need to provide are the routines for driver's view/machine view that are methods that only need to set up transformations (as documented). Check out the example machine's lookAtMe method for an example. Looking at the ExampleMachine::lookAtMe method will be really helpful in learning how to set up cameras. Notice how it first sets up the projection matrix (the transform from frustum to screen coordinates) and then sets up the camera transform. For reasons you will learn about soon, the projection matrix goes on a seperate matrix stack than the viewing and other transformations (we'll explain this in class on Wednesday) - but the book probably does a good job.
10/8/2009 - The original zip file was missing files. The new zip file (dated Oct8) should work. The link below is fixed, or just click here 10/8/2009 - A warning on the ZIP file: The Utilities directory contains a lot of stuff you won't need for this project. For example, you should delete the "glee" files (.c/.h) since they are big, and not used for this project. We'll use them in the future. Also, you can safely ignore/delete the "CVS" directory (which is only useful to me). CS559 Construction Site ProjectOn this page... (hide) Project Due: Wednesday, October 21st - (projects late policy) 1. IntroductionAs you've noticed, there's a lot of construction around the CS building. First WID, now Union South. Watching construction - especially with heavy equipment - is pretty fun. Wanting to watch big construction machines work seems to be genetic (as a father of a 3 year old, I can confirm this). Although some people might lose their fascination with construction equipment as they grow up, many of us have been surprised how fun (distracting?) it is to watch what's going on. Unfortunately, when the Union South construction is complete, there will be no more sides of the CS building to have construction projects! (yes, in the past few years, there has been construction on all sides of the building). We need to have some way to remember all those machines and what they did, since we won't have any to look at. (note: The more obvious solution, take pictures/video of the construction, is being done. But making using of these images is for a different class.) So, your mission in this assignment is to make a 3D simulation of some construction equipment. Fortunately, many types of construction equipment are great examples of hierarchical transformations (articulated figures), so this will be a great opportunity to practice this critical part of the graphics class. 1.1 ObjectivesUnderstanding the "real" goals of this assignment will help you realize what is (and isn't important):
This last part is of some degree of importance: we will provide you with a bunch of code to make a 3D user interface, so you can focus your energy on making construction equipment. If you don't use our code, this assignment will be a lot more work. You may not like our code, but think of it as practice for the real world, where you are often forced to make use of an existing code. Note that many of the things we're discussing later in this class are not part of the assignment. For example:
2. Construction EquipmentHere are some of the kinds of equipment I've seen at work at the WID and Union South sites:
If you notice, for each of these, the main function consists of a number of pieces that move with rotation/translation with respect to one another. Many involve just rotation (e.g. excavator, bulldozer, dump truck), others have some translation involved (cranes). The main portion of this assignment is to make a few of these pieces of construction equipment. You need to make them such that each of the main pieces is separate so you can change the "parameters" of the transformations and make the machine move. For example, consider the dump truck. Like all pieces of equipment it has 3 parameters that are its position in the work (x,y on the ground plane, and theta - its orientation on the ground plane). But it also has another parameter - the angle of the "dump". That main thing you do for this assignment is to create the functions that implement the various pieces of construction equipment (including drawing them). 2.1 If you really don't like construction...In the event that your inner 3 year old isn't excited by this, there are other "machines" that can also be modeled / simulated as a number of pieces moving relative to one another. Many amusement park rides (ferris wheels, merry-go-rounds, tilt-a-whirls, ...) fall into this category, and if you want, you can make some of those. Note that "track rides" (like roller coasters) are quite a different thing, and will be the subject of another assignment. We want to let you be creative in what you choose to model, but remember, our goal here is to have you learn about modeling with transformation hierarchies. So having something that moves in a "creative" way, is only valuable if it moves in the way its supposed to. (not "i meant for it to do that"), and its modeled as a hierarchy of transformations. Also, not all of the things construction equipment can do (like place rocks) make sense for other things. Make sure you have enough equipment to show off the features. 3. The Construction Site (and code framework)The pieces of construction equipment need a construction site to work in. More practically, this is the program that puts up a window, provides lighting and a camera UI, provides an interface to each piece of equipment, etc. We will provide you with an (admittedly simple) framework for doing the project. It will define an "abstract base class" for "Machines" (pieces of construction equipment). Your main task for this project is to define subclasses for different types of machines. You'll also need to edit the setup portion of the program to have it put the Machines into the construction site. The example code is intentionally very simple. You can clean it up, provide a spiffier interface, add features, etc. You can even re-write it from scratch if you're really ambitious (warning: this will be a lot of work, and you'll need to make sure you provide all the functionality). However, this is not the focus of the assignment. The main thing your grade is based on is how well you implement the various machines. 4. What machines need to be able to doTo work in the simulation, machines need to:
At a minimum, a machine needs to do 1-3. 4 and 5 only make sense for some machines (those that drive and those that can pick things up). You'll need to make at least one machine that does everything (an excavator, or a boom pump). There is a virtual base class for A Caveat on setting the view in general... A Caveat on Driver's view: A Caveat on Lighting: A Caveat on Controls: A Caveat on Computing the Position of the End-Effector: 5. Assignment requirementsAt a minimum you must:
The sample executable meets this requirement. With an amazingly small amount of code. To go beyond the minimums you can:
Note: it is more important to have machines with the correct behavior than it is to have them look really nice. If you really want to write a model loader (or find one on the web and incorporate it into your program), and either model things yourself or find models on the web, that's fine (providing you give proper attribution). However, its a lot of work, and you still will need to figure out how to have the models have the pieces move correctly (which can be harder than making things from scratch). If you have no idea what a model loader is, don't worry about it. Appearance does matter. Its a secondary concern (after behavior), but having nice shapes is important. Having decent normal vectors (so lighting shows up correctly) is also 6. Caveats on the CodeThe framework code that you will be using is somewhat simple. It was designed for a minimum of dependencies on other things, and to make it as easy as possible to do the basic aspects of the assignment. This means some unusual design choices were made (for example, there is no 3D point class or math library used), and the interface is a bit overly-simplified. The framework code may evolve over the course of the project. We might fix bugs, or add interface improvements. We will provide updated code as its available. To make it easier to get updates, we recommend:
The camera control code was given in previous years, you can find the sample code discussed on 2007 Sample Code Page. You might also want to look at last year's Tutorials for examples of how OpenGL and FlTk work together. Don't expect to figure out how the camera code works: it's based on some tricky concepts (such as quaternions) inside. Hopefully all the internals are hidden from you. When I refer to "camera control code" I am refering to the thing that spins the world around in "world" view mode. What you need to provide are the routines for driver's view/machine view that are methods that only need to set up transformations (as documented). Check out the example machine's lookAtMe method for an example. The one thing you probably do want to know about the camera: use the right mouse button. If you hold the ALT key, you'll pan instead of rotate. It only looks for the ALT key when you first press the mouse button. 7. What you will turn inYou will need to turn in everything that is required to build your project (including the framework code). This includes the visual studio solution and project files. As usual, do not turn in binary files or debugger information. Be sure to turn in a README file that describes your project. It should list all of the changes you've made to the example code. In the README, be sure to:
Also, include screen shots (in .png or .jpg format) that include pictures of each type of machine you've created. 8. What we will give youWe will provide you with the framework code. Download this zip file - this version is dated October 5th. There is a sample executable that meets the minimum requirements. It has an excavator, a (very simple) dump truck, and a crane. We may provide another executable with more machines to play with 9. DeadlinesThe project is due on Wednesday, October 21st. Late projects will be accepted according to the course late policy. (A late project may be turned in until Friday, October 23th, and a very late project until sometime around the following week). 10. A Closing NoteLast year, several (at least 4) former 559 students have found out about this project (makes you wonder why former students look at the web page from a class they took 1-2 years ago), and commented to me that they thought it sounded fun. That's the idea. Hopefully, this is a fun way for you to experiment with coordinate systems. The minimum requirements are quite simple, but hopefully people will be creative and make cool stuff! Last year, we saw some pretty cool things. |