voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
voxelTerrain

Table of Contents

Introduction

Version
1.3
Author
Markus Lanner

Source

The full source is available at github.

About

The voxelTerrain library implements an iso surface of voxel. Several extras, like serialization, synchronisation to file/network/database, renderer, ogre3d-wrapper, bullet-physics-wrapper and more got implemented too. We focus on an easy-to-use, very fast, editable terrain. For a highly speed-optimized and threadable solution marching cubes and for closing the gaps between two different level-of-details, transvoxel get used. It's easy to implement your own surface generation by simply implementing your own version of voxel::tile::accessor and voxel::tile::surface. This library is divided in several parts:

These classes dispatch all work on threads, so every tile gets calculated by one thread, but the tiles get calculated asynchronous/parallel. The speedup is nearly the amount of threads.

Checkout the Examples to get yourself started.

voxel_crack.png
A terrain with disabled transvoxel. The cracks are a result of tiles with different detail
voxel_crack_wire.png

Showcase

The videos show large terrains. Please note that the lags only occur because of the recording software.

voxel_mesh.png
Shows the results of mesh-to-voxel. The white mesh is the mesh that got converted.
voxel_multimaterial.png
Uses a custom voxel-type. Every voxel saves additionally a colour which gets mapped to the generated vertices.
voxel_lod_wire.png
Shows a simplex-noise generated terrain with 3 level of detail.

Examples

Compilation

Use cmake to compile the library.

Tested compilers

The library uses several C++11 features like nullptr, strongly typed enumerations, lambda and more. So ensure you got an up-to-date compiler.

Precompiled binaries

There are precompiled binaries for Visual Studio 2012 (msvc11) available at github.

Dependencies

The only dependency mandatory is boost. Used get boost::bind, boost::asio (used for dispatching work and synchronizing threads - Lock-free implementation), boost::date_time, boost::chrono, boost::filesystem, boost::thread, boost::function, boost::log, boost::geometry and boost::signals2.

Optional dependencies