Terramancer Begins

Hello,
This is the second project geared for game design. The first one, MiniCAD, is nearly complete, having just a few bugs to smooth out. Since I'm able to construct models with it, I'm happy, and won't worry about fixing everything until later.
This is Project Terramancer, and it is for generating a "heightmap", or terrain for a 3d game.
The basis is fairly simple. There is already an ability to generate a heightmap from a square bitmap as follows:
1. A square bitmap is created using a piece of software like Terragen. This makes what appears to be a grayscale aerial view of the desired landscape.
2. A program is run against the bitmap and creates polygons using the alpha channel of each pixel of the bitmap. The closer a particular pixel is to the color white, the higher up from the ground that point is. For Terramancer, I opted for quads to better facilitate texturing.
3. The data generated is stored either in main memory or in the video card's memory.
The result is a grid of squares, where every intersection point contains a height value. It looks pretty neat.
For now, it can show a wire mesh of points that are color-coded according to their height. Red is high terrain, yellow is mid level and green is flat ground. Since I chose to load the data in main memory, a speed optimization has been included in that only squares currently visible are to be drawn.
This project will be a standalone one, since the common thread for all 3d games I'd make will probably need this terrain mesh. Level editing and scripting will be taken care of as needed for each game.
So uh... I'm practically done. All that's left is putting in the ability to change the landscape via mouse click and to generate the normals for each quad.

0 Comments:
Post a Comment
<< Home