using voxelizer interactively
When voxelizer starts up, you'll see the GUI pictured at the right. To voxelize a model, click "load model" and choose the model you want to voxelize.
Before voxelizing an object, you may want to click "test voxelization" just to confirm that the floodfill is successful and that the mesh is watertight (if it's not, the whole bounding box of the mesh will get filled). When you're ready to voxelize, just click "voxelize". If the object is "hello.obj", you'll get a file called "hello.v[nn].voxels", where "nn" indicates the resolution of voxelization (see below).
Other parameters you can change:
- You can change the resolution of voxelization (or tetrahedralization) in the "voxel resolution" box. This is the number of voxels along the longest axis of the bounding box of your object. Larger voxels produce a coarser mesh and also may lead to problems getting through "tight spots" in your mesh. Voxels are isotropic, so the long-axis resolution determines the resolution on the other two axes.
- Sometimes the seed voxel for the floodfilling is a bad choice. You can change the seed (where the flood-fill begins) by clicking any triangle in the mesh.
- You can load "subtractor" and "modifier" models _after_ you load the model you want to voxelize. A "subtractor" model is used to put "holes" in your voxelized object; it blocks off space that should be considered _outside_ the object. A "modifier" model is used for distance-field computation; every voxel is output along with its shortest distance to each of the modifiers.
- Use the "compute distance field" check to determine whether the program computes a distance field when it computes a voxel array. This takes about 10 times longer than flood-filling alone, so if you just want a voxel array, you should leave this un-checked.
- You can rotate and move the model in the viewport to examine it; these transformations will _not_ affect the output. Use the following mouse-drag operations to manipulate the object (inherited from winmeshview):
rotate the object
move the object
pan the camera
zoom the camera
rotate the camera
using the voxelizer .ini file
When voxelizer starts up, the program will look for a file called voxelizer.ini. The supplied .ini file looks like:
# OBJECT_TO_VOXELIZE bunny.capped.obj
# SEED_TRIANGLE 5
# OBJECT_TO_VOXELIZE gear.obj
# SEED_TRIANGLE 5
# OBJECT_TO_VOXELIZE happy_vrip_res4.ply
# SEED_TRIANGLE 500
Blank lines and lines beginning with '#' are ignored. The available options in this file are:
same as the corresponding dialog box, explained above
same as the corresponding check box, explained above
the mesh to load at startup. only one meshes will be processed; if more than one OBJECT_TO_VOXELIZE entry is present, all but the last will be ignored.
a seed triangle to start the flood-fill
If this is 0, the program will load the specified model and start the GUI. If this is 1, the program will immediately voxelize the specified model and quit.
Voxel files are stored in a binary format, specified in detail in voxel_file_format.h
Four sample models are included. They don't all voxelize well with the default seed; load them using the provided .ini file (which contains commented-out entries with seeds for each model), or click somewhere near the core of the model before voxelizing. Models were obtained from the Stanford 3D Scanning Repository, except for the gear, which came from the INRIA mesh repository.
The most recent version of the code and all build dependencies is on github.
contains the voxelizer sources and binaries plus required dll's, sample
models, the default .ini file, and this .html file. Also includes this Matlab script to read the voxelizer
program's output files into Matlab. This version was last updated in 2013.
Feel free to send comments, suggestions, bug reports, or indications that this was useful software to email@example.com.