Integer-Only Cross Field Computation (IOQ)

 

Implementation code for our paper "Integer-Only Cross Field Computation" (SIGGRAPH 2018). It computes a smooth cross field on a triangle mesh using an efficient grid search algorithm for finding the cone singularities. Cross fields are a type of a direction field in which four unit vectors are defined at each point (unlike a regular vector field which has only one vector at each point). They are used in many applications in geometry processing, from quad remeshing to non-photorealistic rendering. See this for a really nice introduction to the subject.

If you use this code, please cite our paper:

 

We also provide (windows) binaries for the full mesh quadrangulation pipeline, for vector field visualization, and an MIQ implementation (using libQEx and libigl).

Setup

With a GPU

First, compile the CUDA kernel:

  1. Install the CUDA drivers
  2. Add nvcc.exe to your path (i.e., C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin)
  3. Run setup.m with COMPILE=true.

Alternatively, a precompiled .ptx is included. To use it, just run setup.m.

Without a GPU

Just run setup.m and then try one of the examples.

Usage

Basic

To load a mesh and compute a cross field on it, just run:

 

IOQ has a couple of options that you can play around with, the most important of which is whether or not to use the GPU, and whether to use the resistance distance approximation. For best results, use both (this is the default).

See the examples folder for more.

Binaries

We also provide binaries for libQEx and and wrappers for a couple libigl methods. You can use these to quadrangulate a tri mesh:

 

run the MIQ [Bommes et al. 2009] cross field computation:

 

and visualize the cross field:

 

Limitations and Disclaimers

The main limitation is that directional constraints are currently not supported. Another limitation is that for best performance you need a GPU with a lot of RAM.

Also, note that the code was tested on Windows 10 only, though most of it should probably work on other platforms as well (excluding the binaries of course).

References