Computer Graphics Project report

advertisement
Computer Graphics
Project report
Malin Andreassen
05.12.11
1
1
Implementation
1.1
Code
Much of the work is based on already existing code, but is changed and adapted to fit
my project.
I used many of the examples from IFE and the colour chooser and orientation tracker
from a project from last year.
1.2
Modelling
Most of the models, the furniture, is taken from the model package we were provided
with from IFE. I have modelled the room myself in Wings3D, and exported it as a .wrl
file.
1.3
Picking
Left clicking on an object, lets the user pick up an object and move it around the room.
To rotate the object, right click and move left or right.
1.4
Navigation
It is possible to pan through the room with the right mouse button. The view can be
changed between two different modes: an basic overview over the room and a ”walk”
mode. To change view, click the ”change view”-button.
1.5
Interpolators
I decided to animate a cup on the table in the room, it is rotating. This cup can not be
moved and if not affected by physics.
1.6
Physics
All the models, except the cup mentioned above and the room itself, can be affected by
physics. However, there are some bugs:
• If an object is assigned a negative mass, the object will fall through the floor.
• Objects may fall off the map.
• Collision shapes may not always map 100% to the related 3D models, which means
a model may flout a bit above another model if placed on top of each other.
2
2
User manual
When the application starts, the user can choose whether or not to use stereoscopic
view, and choose whether or not to use orientation tracker. If the user chooses orientation tracker, the view will be set to a ”walking” view, where you can walk through the
room using the W, A, S and D keys. To change direction, hold down right mouse button
and move the mouse in the wanted direction.
If the user does not choose orientation tracker, the view will be set to a default view.
Press the right mouse button to pan the room, and the left mouse button to select an
object.
Everything in the room, except for the cup on the table, can be moved, changed and
removed. New models can also be added via the ”add object”-button. To remove an
object, click on the object and then on the ”remove object”-button.
The models that are in the room, are not affected by physics, but than can be changed.
Click on an object, and then the ”change mass”-button and enter a new mass. When
adding new objects to the room, the mass can also be set there.
Finally, the colour on the walls and the floor of the room can be changed. Click on
the ”change colour”-button, select which colour and which parts to recolour.
3
3
Snapshots
4
5
6
Download