Back to Joe's Java Index Back to 3D Graphics Index.


Geometrical MipMapping in Java

 

I have written a small Java program that implements the Geometrical MipMapping landscape level-of-detail algorithm for rendering large terrains with a lot of detail. The algorithm is very clearly described in a Flipcode article entitled, "Fast Terrain Rendering Using Geometrical MipMapping", by Willem H. de Boer. This algorithm is extremely simple and yet it easily out-performs my split only ROAM implementation on machines that have hardware accelerated 3D graphics (who doesn't these days?). I believe that the GeoMipMap algorithm's philosophy of unloading the CPU and loading up the 3D graphics hardware is even more ideal for use in Java than in C++ due to the CPU overhead caused by running in a Java VM.

This implementation was created by me from the description in Mr. de Boer's paper. It works with height maps of any size (they need not be square) as long as the height and width are each divisible by the terrain block size (64 in my demo). Also, you can have any constant spacing you want between grid points. This implementation uses a simple altitude shading model, you may want to do something more realistic in a real application.  The source code is released under the terms of the Lesser GPL.  Here are some screen shots:

Textured
Textured
Wire Frame
Wire Frame
Observe Algorithm
Observe Algorithm at Work


This program uses JOGL in order to directly access OpenGL from Java. This gives the Java program relatively good rendering performance. You will need to download and install the JOGL libraries in order to compile and use this program (the executable applications below includes the necessary libraries in the application bundle).

This program is available as an executable for MacOS X, Windows and Linux on x86. You can also download the full source code to the program and compile it for your platform.

MacOS X Application (1.7MB)
November 23, 2004

Java application, as a compressed disk image, that will run under MacOS X 10.3 or later (won't work on earlier releases). Includes a sample 1024x1024 height map and the full source code.

Windows Application
(2.6 MB)
November 23, 2004
Java application, as a Zip compressed installer, that will run under Windows 2000 or XP.  Requires Java 1.4.2 or later.  Includes a sample 1024x1024 height map.  Does not include source code.
Linux Application
(2.8 MB)
November 23, 2004
Java application, as an installer script, that will run under various flavors of Linux running on an x86 platform.  This has only been tested so far under Fedora Core 2, but it should work elsewhere.  Includes sample 1024x1024 height map.  Does not include source code.

Source Code (324k)
November 23, 2004

The full source code for this program. Includes a sample 1024x1024 height map. Also includes a JAR file with the compiled class files.  Requires Java 1.4.2 or later to compile and use.  Requires that you have the JOGL libraries available on your Java classpath.

Change history.

 Need help?


Created: May 12, 2001
Modified: January 6, 2005