Skip to content

HendrikBrueckler/QGP3D

Repository files navigation

new-new-teaser

Flexible Singularities now integrated into QGP3D!

An implementation of our new paper Volume Quantization with Flexible Singularities for Hexahedral Meshing (coming to Eurographics 2026) has been integrated recently. It allows adaptive simplification of the initial singularity graph at the quantization level and requires C4HexMeshing to extract the simplified structure or a hex mesh.


new-teaser

Integer-Sheet-Pump Quantization now integrated into QGP3D!

An implementation of our new paper Integer-Sheet-Pump Quantization for Hexahedral Meshing (presented at SGP 2024) has been integrated recently, enabling large speedups in quantization computation, and the possibility to drop the cumbersome dependency on integer solvers!

Instead of relying on IQP solvers it employs a greedy, yet near-optimal approach. It is usually faster by 1-2 orders of magnitude and requires only a solver for continuous LPs.


teaser

QGP3D – Quantized Global Parametrization of Volumes

QGP3D is an implementation of Volume Parametrization Quantization for Hexahedral Meshing [Brückler et al. 2022] (SIGGRAPH 2022) and Integer-Sheet-Pump Quantization for Hexahedral Meshing [Brückler et al. 2024] (SGP 2024), distributed under GPLv3.

If you make use of QGP3D in your scientific work, please cite one of our papers. For your convenience, below is a bibtex snippet of the most recent one:

@article{FlexSing,
    author     = {Hendrik Br{\"{u}}ckler and
                 Marcel Campen},
    title      = {Volume Quantization with Flexible Singularities for Hexahedral Meshing},
    journal    = {Computer Graphics Forum},
    volume     = {45},
    number     = {2},
    year       = {2026},
}

How does it work?

QGP3D makes use of the 3D Motorcycle Complex to partition a tetrahedral mesh, equipped with a suitable seamless map, into blocks. It then constructs a valid quantization of the non-conforming partition, that is an assignment of integer lengths to the partition's edges, and deduces optimal integer spacings between all crucial entities (features, optionally also singularities) from this. We guarantee that these spacings, when used as constraints in reparametrization, permit the construction of a globally valid integer-grid-map parametrization from which a hex mesh without defects can be extracted. Greedy rounding, the previous state-of-the-art approach for quantization, can not provide this guarantee and therefore often enforces defects in the output.

pipeline


Dependencies

  • GMP (NOT included, must be installed on your system)
  • GUROBI (NOT included, must be installed on your system), set GUROBI_BASE via cmake to point to correct folder
    • OPEN-SOURCE-ALTERNATIVE: coinor-bonmin, including all its dependencies, namely coinutils, Ipopt (+HSL MA27/coinhsl), Osi, Cgl, Cbc, Clp (NOT included, must be installed on your system)
      • This is automatically chosen if GUROBI could not be detected on your system
    • NEW NON-IQP OPEN-SOURCE ALTERNATIVE: Clp (NOT included, must be installed on your system)
      • This is used as a fallback when neither GUROBI nor BONMIN is found on your system
      • This uses Clp to solve LPs in a greedy but near-optimal algorithm rather than IQP solvers
  • MC3D (included as submodule, together with all subdependencies)
  • polyhydra (volume mesh viewer, included as submodule, enabled via CMake flag -DMC3D_WITH_VIEWER=On)

Building

In root directory

mkdir build
cd build
cmake -DGUROBI_BASE=<path/to/gurobi/> ..
make

Usage

An example command-line application is included that reads a tetrahedral mesh including a seamless parametrization from a file in .hexex-format, as used and documented in libHexEx. It outputs the integer spacing constraints between critical vertices of the input mesh.

After building the CLI app can be found in build/Build/bin/. For full information on its usage, execute

qgp3d_cli --help

Input data

Example input can be found in folder extern/MC3D/tests/resources. A dataset of 200 precomputed motorcycle complexes on seamless parametrizations from various sources is available under MC3D-samples.

Viewer Support

Additionally, the CLI (and library) can be built with support for volume mesh visualization via polyhydra, by calling CMake with the additional flag -DMC3D_WITH_VIEWER=On.

API

A simple interface is provided in QGP3D/Quantizer.hpp. It can be used like this:

// Generation of tet mesh and seamless parametrization, optionally feature markers
// ...

// tetMesh: your mc3d::TetMesh
qgp3d::Quantizer quantizer(tetMesh);

// param: your property defining mc3d::Vec3d parameter values for each tet-vertex-pair
for (auto tet: tetMesh.cells())
    for (auto v: tetMesh.cell_vertices(tet))
        quantizer.setParam(tet, v, param[tet][v]);

// isFeatureF, isFeatureE, isFeatureV: your properties marking features
for (auto f: tetMesh.faces())
    if (isFeatureF[f])
        quantizer.setFeature(f, true);
for (auto e: tetMesh.edges())
    if (isFeatureE[e])
        quantizer.setFeature(e, true);
for (auto v: tetMesh.vertices())
    if (isFeatureV[v])
        quantizer.setFeature(v, true);

// This scaling factor is applied to the parametrization before quantization
double scaling = 1.0;
// This will contain integer spacing constraints that will enforce a valid quantization
std::vector<qgp3d::PathConstraint> constraints;
// This will hold the number of hexahedra implied by the quantization
int nHexahedra = 0;

// Compute a quantization and retrieve the corresponding spacing constraints
quantizer.quantize(scaling, constraints, nHexahedra);

// Generate a quantized seamless parametrization (integer-grid map)
// by enforcing the retreived integer spacing constraints during reparametrization
// ...

For more details on the API of the library, check the headers in include, they are thoroughly documented. Apart from that, cli/main.cpp demonstrates usage of the entire pipeline for both simple and advanced usage.

About

A quantization method for volumetric parametrizations based on the MC3D

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors