lingxiaoli94 / interactive-hex-meshing

Source code for "Interactive All-Hex Meshing via Cuboid Decomposition" [SIGGRAPH Asia 2021].
MIT License
156 stars 19 forks source link

Interactive All-Hex Meshing via Cuboid Decomposition

teaser Video demonstration

This repository contains interactive software for the PolyCube-based hex-meshing problem. You can solve hex meshing by playing minecraft!

Features include:

It is the original implementation of the SIGGRAPH Asia 2021 paper "Interactive All-Hex Meshing via Cuboid Decomposition" by Lingxiao Li, Paul Zhang, Dmitriy Smirnov, Mazdak Abulnaga, Justin Solomon. Check out our paper for a complete description of our pipeline!

Organization

There are three main components of the project.

In addition,

Dependencies

Main dependencies that are not included in the repo and should be installed first:

There are additional dependencies in external and should be built correctly with the provided CMake hierarchy:

Linux Instruction

The instruction is slightly different on various Linux distributions. We have tested on Arch Linux and Ubuntu 20.04. First install all dependencies above using the respective package manager. Then download and unzip Pytorch C++ frontend for Linux (tested with cxx11 ABI) -- it should be under the tab Libtorch > C++/Java > CUDA 11.x. Add Torch_DIR=<unzipped folder> to your environment variable lists (or add your unzipped folder to CMAKE_PREFIX_PATH). Then clone the repo (be sure to use --recursive to clone the submodules as well). Next run the usual cmake/make commands to build target hex in Debug or Release mode:

mkdir -p build/Release
cd build/Release
cmake ../.. -DCMAKE_BUILD_TYPE=Release
make hex -j

This should generate an executable named hex under bin/Release/hex which can be run directly. See CMakeLists.txt for more information.

Windows Instruction

Compiling on Windows is trickier than on Linux. The following procedure has been tested to work on multiple Windows machines.