Quantcast
Channel: Hacker News
Viewing all articles
Browse latest Browse all 25817

Cuda-Accelerated Polygon Mesh Voxelizer

$
0
0

Time to release something that’s been gathering dust on my hard drive for a bit too long: I wrote a CUDA-accelerated voxelizer. It converts polygon meshes into annotated voxel grids. You can download source code and executables on Github.

  • Written in C++ / CUDA
  • Outputs data to .binvox file format (default) or a morton-ordered grid. More output formats (magicavoxel, minecraft schematic) are in development.
  • Requires a CUDA-compatible video card. Compute Capability 2.0 or higher (Nvidia Fermi or better).

viewvox

cuda_voxelizer implements an optimized version of the method described in M. Schwarz and HP Seidel’s 2010 paper Fast Parallel Surface and Solid Voxelization on GPU’s. The morton-encoded table was based on my 2013 HPG paper Out-Of-Core construction of Sparse Voxel Octrees and the work in my libmorton library.

cuda_voxelizer is built with a focus on performance. Usage of the routine as a per-frame voxelization step for real-time applications is viable. More performance metrics are on the todo list, but on a GTX 1060 these are the voxelization timings for the Stanford Bunny Model (1,55 MB, 70k triangles), including GPU memory transfers.

Grid sizeTime
128^34.2 ms
256^36.2 ms
512^313.4 ms
1024^338.6 ms

More to come! I’m focusing on outputting to Minecraft schematics ASAP, to offer an alternative to Patrick Min’s excellent, but memory-limited binvox.

There is also still a lot of headroom for performance improvements.


Viewing all articles
Browse latest Browse all 25817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>