Git Product home page Git Product logo

inpainting-holes-in-folded-fabric-meshes's Introduction

Teaser

Inpainting Holes in Folded Fabric Meshes

This repository contains a research prototype implementation of the paper Inpainting Holes in Folded Fabric Meshes, Computers & Graphics.

The method proposes to fill holes in triangle mesh surfaces representing fabrics. The software allows the user to provide a mesh with a hole and to fill it.

Build Instructions

The project requires CGAL to be installed on your computer. Instructions for installing CGAL can be found here. It also requires on geometry-central, polyscope and libIGL as well as a C++17 compiler. You can build the project as follows:

git clone --recurse-submodules https://github.com/g-gisbert/Inpainting-Holes-In-Folded-Fabric-Meshes
cd Inpainting-Holes-In-Folded-Fabric-Meshes
mkdir build
cd build
cmake ..
make -j8

Run Instructions

You can run the app by issuing:

./bin/pgm <path/to/file>

If you want to run the teaser example, you can just type:

./bin/pgm ../data/sim1_hole.obj

Adding colliding objects

You can edit the config.txt file to add colliding objects to constraint the optimization. You can use spheres or cylinders. Each row corresponds to one object. For spheres, you can add them as follows:

# sphere x y z radius
sphere 0 0.5 0 1.3

For cylinders, you must also specify the height and the three Euler angles that control the rotation.

# cylinder x y z radius height eulerX eulerY eulerZ
cylinder -3.65421 0.652517 0.0 1 6 0 -1.415462 0

By default, the sphere corresponding to the teaser is active. You can disable it by commenting the line with a '#' character at the beginning of the corresponding line.

Using the GUI

Hold down the left mouse button and move the mouse to rotate. Right-click to move the camera.

In the right panel, you can set up the coefficients for each energy term in the minimization as well as the fixed time step. Then you can choose between two bending energies and enable or disable collisions. Finally, there are three buttons. 'Steps' will perform 2000 gradient descent steps, 'Toggle' will continuously optimize the mesh and 'Save Mesh' allows you to export the optimized mesh.

To reproduce the teaser example, just press the 'Steps' button.

Typical parameters

Typical parameters you can use for the given examples.

Filename Edge Lengths Bending Repulsive Bending Energy
sim1_hole 0.1 0.02 0.01 Quadratic
sim2_hole 0.1 0.02 0.01 2-Ring
curtain 0.1 0.003 0.01 Quadratic
contour 0.1 0.003 0.01 Quadratic
paper1 0.1 0.003 0.01 Quadratic
paper2 0.4 0.02 0.01 Quadratic

For sim1_hole, make sure the following line is uncommented in config.txt:

sphere 0.0 0.5 0.0 0.509

For sim2_hole uncomment the three last lines:

cylinder -3.65421 0.652517 0.0 1 6 0 -1.415462 0
cylinder 0.114316 3.64177 0.0 1 6 0 -0.261799 0
sphere -0.660382 0.749638 0.0 1.0

inpainting-holes-in-folded-fabric-meshes's People

Contributors

g-gisbert avatar dcoeurjo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.