[valley PIC] Chapter 27.   Terrain Generation with Terragen

 

A significant drawback of the FractalLand3D example from the last chapter is the programmer's lack of control over the generated terrain. Most games require mountains, fields, lakes, and so on, to be in fixed, specific places, rather than randomly located each time the program starts.

A theme of earlier chapters is the use of external modeling software to create complex-looking scenery, artifacts, and figures. The same argument applies to terrain building -- there are many excellent tools far more suited to the task than a DIY approach coded in Java.

We will use Terragen, a popular scenery generation package. The landscape is designed with Terragen, then exported as a OBJ file (representing the landscape as a mesh), and as a BMP (showing the surface viewed from above). The BMP is subsequently edited and converted into a JPG.

[desert PIC] Our Terra3D application loads the OBJ and JPG files, using the JPG as a texture to cover the Shape3D created from the landscape mesh. The images on this page two landscapes, originally designed with Terragen, then loaded by Terra3D.

The pictures show some of the other elements of Terra3D:

 

Downloads


Navigation:


Dr. Andrew Davison
E-mail: ad@coe.psu.ac.th
Back to my home page