From Manta Wiki
Jump to: navigation, search

Using octree compression and direct isosurfacing, I'd expect around 3 fps for a dataset of that size (1024^3) on just 2 processors. Without octree compression (i.e. using a grid), you'd probably get even slightly better performance (but not much). I have not used it in a long time, and it could very well be broken, but that code is in /Model/Primitives/IsosurfaceOctreeVolume.h if you are interested. There is an octree volume builder in /StandAlone/octvol_build.cc -- this should also be an executable in /bin. Documentation is non-existent, but take a look at the code comments and you should be able to figure it out. For example, to compress your existing X,Y,Z volume into an octree, you'd do:

./bin/octvol_build -buildfrom filename

filename should be the name (without extensions) of your volume. It will look in the directory you specify for two files:

filename.vol, the raw volume data
filename.hdr, a text header that should look exactly like this
(assuming you're using unsigned char scalars in your volume)
1024 1024 1024
0 0 0
1024 1024 1024
0 255

This will create an octree volume, consisting of filename.otd and filename oth. Depending on how entropic your volume is, you'll usually get 2x-5x compression by doing this. The octree acceleration structure is embedded inside it.

Then, to run Manta on this, here's an example:

./bin/manta -np 2 -shadows noshadows -imagetraverser tiled -scene "lib/libscene_octisovol( -file filename)"

I never did bother to get shadow rays working for some reason (namely a rush job before RT06)... and make sure you use "filename" with NO extension. It will look for three things:

filename.hdr -- the aforementioned header file
filename.oth -- octree header, generated by octvol_build
filename.otd -- octree data, also generated by octvol_build

Still, this is single-ray code -- no packets or SSE optimizations. I'm working on some research code for medium-sized volume data using a coherent hierarchical grid -- your data would fit the bill quite nicely. I might come back in a week or two with a much better (namely faster) option for you!

1 GB data is a good application for volume ray tracing (especially using macrocell grids and octrees). It fits inside CPU main memory easily, but wouldn't fit on a GPU unless you implemented some messy out-of-core stuff.