Interactive-hex-meshing - Source code for "Interactive All-Hex Meshing via Cuboid Decomposition [SIGGRAPH Asia 2021]".

Overview

Interactive All-Hex Meshing via Cuboid Decomposition

teaser Video demonstration

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

Features include:

  • a 4-stage interactive pipeline that can robustly generate high-quality hex meshes from an input tetrahedral mesh;
  • extensive user control over each stage, such as editing the voxelized PolyCube, positioning surface vertices, and exploring the trade-off among competing quality metrics;
  • automatic alternatives based on GPU-powered continuous optimization that can run at interactive speed.

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.

  • The geomlib folder contains a standalone C++ library with GPU-based geometric operations including point-triangle projection (in arbitrary dimensions), point-tetrahedron projection (in arbitrary dimensions), point-in-tet-mesh inclusion testing, sampling on a triangular mesh, capable of handling tens of thousands of point queries on large meshes in milliseconds.
  • The vkoo folder contains a standalone object-oriented Vulkan graphics engine that is built based on the official Vulkan samples code with a lot of simplification and modification for the purpose of this project.
  • The hex folder contains the application-specific code for our interactive PolyCube-based hex meshing software, and should be most relevant for learning about the implementation details of our paper.

In addition,

  • results.zip contains the *.h5 project file and the *.mesh output hex mesh file for each model in the Table 2 of the paper. The *.h5 project files can be loaded in our software using File > Open.
  • The assets folder contains a small number of tetrahedral meshes to test on, but you can include your own meshes easily (if you only have triangular meshes, try using TetGen or this to mesh the interior first).
  • The external folder contains additional dependencies that are included in the repo.

Dependencies

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

  • CMake
  • CUDA (tested with 11.2, 11.3, 11.4, 11.5) and cuDNN
  • Pytorch C++ frontend (tested with 1.7, 1.8, 1.9, 1.10)
  • Vulkan SDK
  • Python3
  • HDF5

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

  • Eigen
  • glfw
  • glm
  • glslang
  • imgui
  • spdlog
  • spirv-cross
  • stb
  • yaml-cpp

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.

  • Download and install Visual Studio 2019
  • Download and install the newest CUDA Toolkit (tested with 11.2)
  • Download and install cuDNN for Windows (this amounts to copying a bunch of dll's to the CUDA path)
  • Download and install the newest Vulkan SDK binary for Windows
  • Download and install Python3
  • Download and unzip Pytorch C++ frontend for Windows. Then add TORCH_DIR=<unzipped folder> to your environment variable lists.
  • Download and install HDF5 for Windows
  • In VS2019, install CMake tools, and then build the project following this This should generate an executable under bin/Debug or bin/Release.
You might also like...
Edit a PF-DTA content in hex on a side-by-side display of EBCDIC character representation.
Edit a PF-DTA content in hex on a side-by-side display of EBCDIC character representation.

AS400 Hex Editor Edit a PF-DTA content in hex on a side-by-side display of EBCDIC character representation. Introduction This tool was written to edit

bviplusplus (bvi++) is an ncurses-based hex editor derived from bviplus

bviplusplus (bvi++) Overview bviplusplus (bvi++) is an ncurses-based hex editor derived from bviplus Links Other bviplus derivatives bviplus by Barano

Source code for the article "Code vs Data Driven Displacement"

Code vs Data Driven Displacement This repo contains the source code for all the demos from this article. It uses raylib or more specifically raygui so

Upgraded from Pixar postcard path tracing, instead of printing Pixar, this program print my name, which pose to be more challenging than the original code. The upgraded is also more readable and run 9x faster than the original source code.
Reverse engineered source code of the engineowning cheat for cod9 (tags, ignore. Fortnite cheat, engineowning, engineowning cracked, cheat cracked, cod cracked cheat, cod cheat source)

engineowning-cod9 Reverse engineered source code of the engineowning cheat for cod9 Cracked by CODEX notinjector = C:\Windows\Release\ .exe drSYS = C:

Gauss Stylization - Interactive tool for normal driven stylization

Interactive tool for normal driven stylization. A set of preferred normals can be chosen arbitrarily from the Gauss sphere, including semi-discrete sets to model preference for cylinder- or cone-like shapes.

My_Shell is a user-defined interactive shell written in C that works similar to the original shell in linux

MY_SHELL Overview My_Shell is a user-defined interactive shell written in C that works similar to the original shell and it can execeute many of the l

Tuibox - A single-header terminal UI (TUI) library, capable of creating mouse-driven, interactive applications on the command line.
Tuibox - A single-header terminal UI (TUI) library, capable of creating mouse-driven, interactive applications on the command line.

tuibox tuibox ("toybox") is a single-header terminal UI library, capable of creating mouse-driven, interactive applications on the command line. It is

htop - an interactive process viewer
htop - an interactive process viewer

Introduction htop is a cross-platform interactive process viewer. htop allows scrolling the list of processes vertically and horizontally to see their

Comments
  • kEps is undefined in device code in file (generalized_projection_cuda.cu)	61

    kEps is undefined in device code in file (generalized_projection_cuda.cu) 61

    Thank you for your project. I'am Aerospace Engeneer and new in GitHub. I've a problem in building a project on VS2019. When I run the build, the following error appears in the file generalized_projection_cuda.cu . There is a problem with the "keps" variable.

    How to solve this problem?

    Settings:
    Windows 10
    CUDA 11.2
    Pytorch 1.12.1
    
    identifier "geomlib::_NV_ANON_NAMESPACE::kEps" is undefined in device code	C:\Users\1\Downloads\interactive-hex-meshing-main\interactive-hex-meshing-main\out\build\x64-Debug\interactive-hex-meshing-main	C:\Users\1\Downloads\interactive-hex-meshing-main\interactive-hex-meshing-main\geomlib\geomlib\generalized_projection_cuda.cu	61	
    
    
      [197/260] Linking CXX static library vkoo\vkoo.lib
      [198/260] Building NVCC (Device) object geomlib/geomlib/CMakeFiles/geomlib.dir/geomlib_generated_generalized_projection_cuda.cu.obj
      FAILED: geomlib/geomlib/CMakeFiles/geomlib.dir/geomlib_generated_generalized_projection_cuda.cu.obj 
      cmd.exe /C "cd /D C:\Users\1\Downloads\interactive-hex-meshing-main\interactive-hex-meshing-main\out\build\x64-
      Debug\geomlib\geomlib\CMakeFiles\geomlib.dir && "C:\Program Files (x86)\Microsoft Visual 
      Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E make_directory
      C:/Users/1/Downloads/interactive-hex-meshing-main/interactive-hex-meshing-main/out/build/x64-
      Debug/geomlib/geomlib/CMakeFiles/geomlib.dir//. && "C:\Program Files (x86)\Microsoft Visual 
      Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -D verbose:BOOL=OFF -D 
      build_configuration:STRING=Debug -D generated_file:STRING=C:/Users/1/Downloads/interactive-hex-meshing-main/interactive-
      hex-meshing-main/out/build/x64-
      Debug/geomlib/geomlib/CMakeFiles/geomlib.dir//./geomlib_generated_generalized_projection_cuda.cu.obj -D 
      generated_cubin_file:STRING=C:/Users/1/Downloads/interactive-hex-meshing-main/interactive-hex-meshing-main/out/build/x64-
      Debug/geomlib/geomlib/CMakeFiles/geomlib.dir//./geomlib_generated_generalized_projection_cuda.cu.obj.cubin.txt -P 
      C:/Users/1/Downloads/interactive-hex-meshing-main/interactive-hex-meshing-main/out/build/x64-
      Debug/geomlib/geomlib/CMakeFiles/geomlib.dir//geomlib_generated_generalized_projection_cuda.cu.obj.Debug.cmake"
      generalized_projection_cuda.cu
    
    opened by IzzakQ 2
  • LFS bandwidth is used up.

    LFS bandwidth is used up.

    Thank you for your great project. When I tried to clone this repo, it failed due to the LFS limit:

    This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
    

    Do you have any storage to upload large files (ex. cloud drive) or any points of contact for funding for the hosting(ex. Paypal, Patreon, Gumroad, etc)? It's a great project and I'd like to try it out, and I think it's a shame that a way to make it more widely known is being closed off.

    opened by Drunkar 1
  • git clone error

    git clone error

    A nice work. However, it seems that i got a trouble when clone this project. And the error is as follows: Cloning into 'external/eigen'... remote: A repository for this project does not exist yet. fatal: repository 'https://gitlab.com/libeigen/eigen.git/' not found

    opened by Talbil 1
  • Adapt to medit official format.

    Adapt to medit official format.

    I tried to convert output mesh file via meshio ( https://github.com/nschloe/meshio ) but it's failed. And I found a few points were different from official medit format ( https://people.sc.fsu.edu/~jburkardt/data/medit/medit.html ). Now the output can be converted via meshio.

    opened by Drunkar 0
Owner
Lingxiao Li
Lingxiao Li
Project is to port original Zmodem for Unix to CP/M and provide binaries and source code for platform specific modification as needed. Based on 1986 C source code by Chuck Forsberg

Zmodem-CP-M This repository is intended to foster a RetroBrewComputers community effort to port the original Zmodem source code for Unix to CP/M so ev

null 11 Aug 31, 2022
Project is to port original Zmodem for Unix to CP/M and provide binaries and source code for platform specific modification as needed. Based on 1986 C source code by Chuck Forsberg

Zmodem4CPM This repository is intended to foster a RetroBrewComputers community effort to port the original Zmodem source code for Unix to CP/M so eve

null 11 Aug 31, 2022
IDA StrikeOut: A Hex-Rays decompiler plugin to patch the Ctree

StrikeOut is an plugin for the Hex-Rays Decompiler. It allows you to delete (hide) statements from the AST, thus simplifying the pseudocode output. This is a useful scenario when you are dealing with lots of junk code or code that don't necessarily increase your understanding of the pseudocode.

Elias Bachaalany 82 Dec 6, 2022
List of Persian Colors and hex colors for CSS, SCSS, PHP, JS, Python, and Ruby.

Persian Colors (Iranian colors) List of Persian Colors and hex colors for CSS, SCSS, PHP, C++, QML, JS, Python, Ruby and CSharp. Persian colors Name H

Max Base 12 Sep 3, 2022
A short and sweet hex dumper!

██████╗ ██████╗ ███╗ ███╗██████╗ ██╔═══██╗██╔══██╗████╗ ████║██╔══██╗ ██║ ██║██║ ██║██╔████╔██║██████╔╝ ██║▄▄ ██║██║ ██║██║╚██╔╝██║██╔═══

Victor Sarkisov 1 Nov 18, 2021
Header only wrapper around Hex-Rays API in C++20.

HexSuite HexSuite is a header only wrapper around Hex-Rays API in C++20 designed to simplify the use of Hex-Rays and IDA APIs by modern C++ features.

Can Bölük 127 Dec 6, 2022
Hex-Rays microcode plugin for automated simplification of Windows Kernel decompilation.

NtRays NtRays is a Hex-Rays microcode plugin for automated simplification of Windows Kernel decompilation. Features Cleanup of instrumentation and sch

Can Bölük 359 Jan 3, 2023
Dexe is a simple hex editor, written in Uxntal.

Dexe Dexe is a simple hex editor, written in Uxntal. Build You must have the Uxn assembler and emulator. uxnasm noodle.tal noodle.rom && uxnemu noodle

DeltaF1 3 Oct 15, 2021
🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.

?? ImHex A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM. Supporting If you like my work, plea

WerWolv 23k Dec 30, 2022
「⚙️」Simple header for C language to encode and decode hex

「 ⚙️ 」Simple header for C language to encode and decode hex Example: Encode: #include <stdio.h> #include <string.h> #include <stdlib.h> #include "hex.

null 3 Jan 1, 2023