Submitted by , posted on 31 October 2002



Image Description, by


I spent a little time recently working with voxels. My goal was to write a simple converter that takes as input a textured triangle mesh, and outputs a colored voxel representation. No particular reason or overly fancy results, just experimenting a bit.

The approach I used to generate the voxel mesh is pretty simple. In a nutshell, it works like this:
  • Generate a grid of cubes over the source mesh.
  • Throw out any empty cubes.
  • Color each of the remaining cubes based on the source mesh's texture.
  • The screenshot shows an example voxel model generated with different resolutions for the grid of cubes. The viewer I wrote renders actual cubes (made up of colored, untextured triangles) for every voxel.

    There's a more detailed explanation of the mesh conversion process, as well as a downloadable demo of the voxel mesh viewer in my journal.

    Thanks for reading...



    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]


     


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