Final Project
(3D Terrain Mapping Software)
Download
Software |
|
Proposal |
|
Report |
Aran Shirdavani and Frank Ow design Final Project for CSS450 on 3D Terrain Mapping Software.
3D Terrain Mapping Software program uses fractal geometry and recursion to dynamically create a terrain. A recursive function populates an array with elevation values which are then given to a 63x63 mesh, which is displayed in the two windows (Figure 1.0).
Figure 1.0 (System User Interface)
System allows user to edit individual vertex to change the elevation values. We have implemented a save and load feature allowing a user to save a custom terrain for future use (Figure 1.1).
Figure 1.1 Wireframe for Terrain editing
We added a small biplane animation to add scale to our terrain, making it feel more like a mountain and less like a pile of dirt (Figure 1.2).
Figure 1.2 Animations
Recursive Fractal Generation
The recursive function uses the diamond-square algorithm. In figure 2.0, the black values are generated by averaging the four surrounding gray values, and adding a random offset to the average elevation. The four corners of figure 2.0 (a) have randomly seeded values. And when you move on to figure 2.0 (b) have the midpoint for randomly seeded values. And move on to figure 2.0 (c), (d), and (e).
Figure 2.0 -- courtesy of http://www.gameprogrammer.com/fractal.html
Every pass when it ran through the terrain it will break into more vertex points in terrain and it will give more detail information on the terrain.
Save and Load
Our Saving and loading system is simple; we output all elevation values as floats to a text file (Figure 3.0). The saved file size is 36kb.
Figure 3.0 Save and Load Function
Manual
Create terrain |
|
Modify terrain |
|
Load terrain |
|
Save terrain |
|
Fly plane |
|
Change large main view |
|
Change small aux. view |
|
Texture mapping |
|