Realtime Voxel Landscape Engines - Part 7 - The Engine
by (21 February 2000)



Return to The Archives
Sample Source Code


In conjunction with this tutorial, I've made the source code of a slightly older version of the engine available: The source code is distributed under the GNU GPL. You'll need a working installation of DJGPP to compile.

There are also some previous versions of the engine source available on the terraVox web site.



The demo has a few options for you to play around with (F1..F5). This includes toggling the use of the lightmap, enabling the distance fog, selecting the texture minification and magnification filters and toggling interleaving. Use the NUMPAD and keys QAWS to fly around, SPACE slows down. It should run reasonably on most current PCs.


Extending the Engine


The engine source which you now have has practically all of the current engine's features, but is limited to greyscale 320x200 output under DOS. Since you know all the concepts and have a basic implementation of the engine, you should have no trouble in getting an engine running with the same quality as the current version of terraVox. All you need is a bit of work, and some spare time :)



If you bother downloading the most recent demo, these are some features you may notice:
  1. dithered filtering on spans up close
  2. shadow from lightmap
  3. practically horizontal spans drawn with mip-mapped texture
  4. voxels are 2 pixels wide, fog starts
  5. voxels become 4 pixels wide
  6. area with sharp texture blending
I've implemented clipping and an much simpler mouse interface to fly around. So be sure to check that out.


Article Series:
  • Realtime Voxel Landscape Engines - Part 1 - Introduction
  • Realtime Voxel Landscape Engines - Part 2 - Rendering the Landscape's Structure
  • Realtime Voxel Landscape Engines - Part 3 - Texture and Lighting
  • Realtime Voxel Landscape Engines - Part 4 - Level of Detail and Optimisation
  • Realtime Voxel Landscape Engines - Part 5 - Quality Improvement
  • Realtime Voxel Landscape Engines - Part 6 - Hardware Acceleration
  • Realtime Voxel Landscape Engines - Part 7 - The Engine
  • Realtime Voxel Landscape Engines - Part 8 - Final Words
  •  

    Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
    Please read our Terms, Conditions, and Privacy information.