[binvox]   3D mesh voxelizer


binvox     thinvox     viewvox     meshconv    

Introduction

binvox is a straight-forward program that reads a 3D model file, rasterizes it into a binary 3D voxel grid, and writes the resulting voxel file.

Features

Download

version 1.19, added 8 August 2014

Older source code of binvox and thinvox is available for download: binvox-0.4.tar.gz. The source compiles under Linux, Mac OS X, and Windows. You most likely need to compile GLUT to a library first: download the GLUT source here. Let me know if you run into compilation problems. The source code is released under the GNU General Public License. Note that the open source version of binvox only reads the OBJ and PLY 3D file formats (more formats to follow).

New in the Linux version: the -pb parameter, which makes binvox render to an offscreen buffer instead of to an onscreen window (if available). This increases the maximum dimension of the voxel grid from 1024 to 4096, depending of course on how much memory your system has (the memory use is dominated by the voxel grid, 1 byte per voxel).

(the binaries have been compressed to about 300K using the UPX executable compressor)(they are self-decompressing)

Usage

Run binvox without parameters for a usage summary.

Credit

If you use binvox for your (published) work, please add a reference to me, to this site (as a link, you could use http://www.google.com/search?q=binvox), and to the paper by F. Nooruddin and G. Turk (see next paragraph). Unfortunately I've already seen one recent scientific paper using my software without proper credit. I'd love to hear what you use binvox for as well.

Note that binvox is free to download and use (in any environment). However, you are not allowed to charge others for the program. Type binvox -license for more information.

Eric Haines contributed the code for the exact voxelization method.

Qingnan Zhou wrote the code for the Gmsh .msh output.

binvox uses the lib3ds library for reading .3ds files.

References

binvox uses the parity count method and (a slight variation of) the ray stabbing method described by Fakir Nooruddin and Greg Turk in Simplification and Repair of Polygonal Models Using Volumetric Techniques, GVU technical report 99-37 (later published in IEEE Trans. on Visualization and Computer Graphics, vol. 9, nr. 2, April 2003, pages 191-205). To speed up the parity counting, a hardware z-buffer "slicing" method is used, based on an idea originally by Emil Praun.

Other references:

Feedback

Please send me e-mail (to patrick.n.min at gmail dot com) with your questions/comments/suggestions/bug reports. I'm also interested to hear about what you use binvox for.

Note that because of differences in hardware and software (drivers, the OpenGL implementation on your OS, etc.) the resulting voxel model will probably differ slightly from one setup to another.


Last modified: Fri Aug 8 13:47:08 CEST 2014


Feature requests


Changelog

1.19: added support for .3ds files, thanks to the lib3ds library
1.18: fixed dimension ordering issue with .vtk output
1.17: fixed bug with -e method for triangles completely at max x/y/z
1.16: added support for writing .nrrd files
1.15: many fixes for large size (dimension > 1290) voxelizations (many thanks to Mark Heller for debugging help)
1.14: Linux only: print information about maximum pbuffer size
1.13: added mesh memory usage info
1.12: added -ary parameter (for arbitary rotation around the y-axis)
1.11: fixed odd Windows-only memory allocation bug. Improved some error messages
1.10: fixed bug with -rotz parameter
1.09: fixed bug that limited voxel dimension to 1290
1.08: fixed hang on OBJ files with unterminated last line. Added VRML 1.0 support (still in alpha)
1.07: added support for writing Gmsh .msh files, code written by Qingnan Zhou
1.06: fixed handling of groups with empty names in OBJ files
1.05: use OpenGL custom clip planes for the -bb parameter (original implementation was buggy)
1.04: voxelizing inside entire unit cube now, to fix symmetry issues
1.03: bugfix for the .obj reader
1.02: bugfix for -e option in combination with fix for dimensions below the Windows minimum window size bug
1.01: bugfix for the -e option (triangles were voxelized too thick)
1.0: bumped version number to 1.0 :-). Workaround for Windows minimum window size bug. -aw re-enabled. Exact voxelization option -e added (written by Eric Haines, using triangle overlap code by Tomas Akenine-Möller)
0.48: carve voxelization rendering bug fix. -aw temporarily disabled.
0.47: added support for negative vertex indices in .obj files
0.46: added -bi parameter, for specifying .schematic block ID, fixed voxel ordering for .schematic files
0.45: fix for bug when using -fit together with -t schematic
0.44: support for writing of minecraft .schematic files. For doing the gzip compression, binvox uses the zlib library, version 1.2.5, © 1995-2010 Jean-loup Gailly and Mark Adler
0.43: -fit option, which crops the voxel model to its bounding box
0.42: the voxel bounding box (i.e. the filled area) is printed
0.41: added -aw option ("add wireframe"), which also renders the model in wireframe (useful for thin parts), and -dc option ("dilated carving") which stops carving in each direction 1 voxel before the intersection point.
0.4: added -rotx and -rotz options, to rotate object before voxelizing (useful for changing the up axis).
0.38: a bug fix of the .obj file reader.
0.37: the -bb parameter, which allows you to force a specific bounding box for the mesh.
0.35: the PLY reading code from the PLY tools was modified slightly to be able to handle Unix/Windows differences.

Patrick Min