Convert Simple Voxel SVX files to OpenVDB files.
The code needs to be cleaned up and a lot more testing done, but it should work for most SVX files.
For info about the SVX format, please see this post about it.
For info about OpenVDB, please check the OpenVDB website.
One nice benefit of converting files in this way is that it allows voxel clouds to be viewed using the vdb_view utility or Houdini tools. Currently there aren't any tools to view SVX files directly, as far as I'm aware.
This is a simple command-line tool that takes two parameters.
svx2vdb infile.svx outfile.vdb
The first parameter infile.svx
should be an existing SVX format file to read in. This will be converted to the OpenVDB format file written to outfile.vdb
.
If you have the OpenVDB tools installed, you can then view the resulting output file as follows.
vdb_view outfile.vdb
An example SVX file is provided in the examples folder. Shapeways also provide a sphere example, or you can generate your own files using Functy.
Converting a Functy shape exported as SVX to OpenVDB, then viewed using vdb_view.
Shapeways example sphere SVX file, and a Quaternion Julia set created by shawn_halayka.
You can use the autotools configure script to build svx2vdb on Linux systems. Set the current working directory to the svx2vdb folder, then enter the following.
./configure
make
If the configure step generates errors, it's likely because you need to install autotools, or one of the code dependencies listed below.
If there are no errors, this will build the svx2vdb binary in the same folder. You can then test it by converting one of the example files and viewing the result.
./svx2vdb examples/urchin.svx out.vdb
vdb_view out.vdb
You can then press the 3
key to show the voxels.
Use make install
as root to install it into the path.
Use make check
to run a basic execution test on the code.
The current dependencies for building svx2vdb are:
- OpenVDB for OpenVDB voxel cloud creation.
- OpenEXR as an OpenVDB dependency.
- libtbb2 for OpenVDB threading.
- libpng for reading SVX slices.
- libzip for extracting SVX file contents.
- libxml-2.0 for interpreting the SVX manifest.
If you're using Linux, most if not all of these should be in the repositories (at least this is the case for Ubuntu 14.10 which I'm using here):
sudo apt-get install autoconf
sudo apt-get install libopenvdb-dev
sudo apt-get install libopenvdb-tools
sudo apt-get install libopenexr-dev
sudo apt-get install libtbb-dev
sudo apt-get install libpng12-dev
sudo apt-get install libzip-dev
sudo apt-get install libxml2-dev
Read COPYING for information on the license. svx2vdb is released under the MIT License.
More information can be found at: http://www.flypig.co.uk?to=linux The source code is avilable from GitHub: https://github.com/llewelld/svx2vdb
I can be contacted via one of the following.
- My website: http://www.flypig.co.uk
- Email: at [email protected]