Final Project

(3D Terrain Mapping Software)

Download

 

Software

Exe.zip

Proposal

Proposal.pdf

Report

Report.pdf

 

Design of System

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).

[image]
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).

[image]
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).

[image]
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).

[image]
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.

[image]
Figure 3.0 Save and Load Function


Manual

Create terrain

  • Using the Roughness slider bar, select the desired level of “roughness” -- level 0 will be nearly flat, level 1 will be very chaotic (best values are close to .8)

  • Click on the Generate button to create the terrain

Modify terrain

  • Check the Selector Visible checkbox

  • Check the Wireframe to show the wire frame of the Terrain. Easy for the user to see during modify the Terrain.

  • Using the Row and Column slider bars around the auxiliary view, select the point to modify – the moving circle indicates which point is selected. The Y-Level will reflect the current value of the selected point in Terrain.

  • After selecting a point, modify its elevation (y-position) with the Y-Level slider bar

Load terrain

  • Click on the Load button and choose a saved file

Save terrain

  • Click on the Save button and choose a filename

  • “.txt” will be automatically appended to the filename

Fly plane

  • Make the airplane is visible by checking the Airplane Visible checkbox

  • Enable the plane’s animation by checking the Anime On/off checkbox

  • Speed up or slow down the plane’s velocity with the Speed slider bar

  • Use the radio buttons to control the plane’s direction (left, right, straight)

Change large main view

  • With the left mouse button, click and drag in the main window to rotate the terrain along any axis

  • With the right mouse button, click and drag left and right to zoom in and out

Change small aux. view

  • With the left mouse button, click and drag in the small auxiliary to pan the view left-right and up-down

  • With the right mouse button, click and drag left and right to zoom in and out

Texture mapping

  • Check the Enable Texture checkbox

  • Click on Load Texture and select a texture file

  • To remove texture, uncheck the Enable Texture checkbox