Giter Club home page Giter Club logo

swept-volumes's Introduction

Swept Volumes via Spacetime Numerical Continuation

Public code release for "Swept Volumes via Spacetime Numerical Continuation", presented at SIGGRAPH 2021 and authored by Silvia Sellán, Noam Aigerman and Alec Jacobson. Please note that while this implementation of our method is hereby released under MIT License, the method itself is pending a US patent filed in 2021 by Adobe Inc.

Important note

An up-to-date, maintained version of this code is implemented into our new python geometry processing library Gpytoolbox. See the swept volume documentation and examples here.

Installation

To install this library, please start by cloning the repository recursively

git clone --recursive [email protected]:sgsellan/swept-volumes.git

After this, compile in release mode using cmake following the usual steps:

cd swept-volumes
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make all -j8

If all goes right, you'll find the executable swept-volumes-gui in the main repository directory. If not, we provide a MacOS precompiled binary in precompiled/osx/bin/swept-volumes-gui that you can move to the main repository directory.

Use

You can begin by running ./swept-volumes-gui with no arguments. A viewer should appear showing a bunny:

You can then use W, E and R to flip between translation, rotation and scaling to move the bunny around.

Press "B" to bake a keyframe in. A copy of the bunny will appear fixed in the current position, and you can move the original bunny around to select your second keyframe:

Keep doing this until you are happy with the trajectory you've built:

Remember to press "B" to bake the last frame. Then, press "S" to run our algorithm to compute the swept volume. Wait for a couple of seconds (up to a minute in this example) and you'll see our output (this took 25s in my MacBook):

Press "V" to compare to a stamping algorithm with 10 stamps. Keep pressing "V" to see 100 stamps and 1000 stamps.

If you want to go back to our output, press "C". You can now close the viewer window, all the files have been saved to data/experiments/dd-mm-hh-mm in .obj format.

Once you have tried this demo, there are many arguments you can pass to our gui, in whichever order. -i path/to/shape.obj will change the input shape (any libigl-readable format is accepted and there are no requirements on manifold-ness or close-ness, default is data/bunny.obj), -e number changes the edge-length of the grid used in our algorithm (lower will be slower and more precise, default is 0.02). A sample call may be

./swept-volumes-gui -i path/to/your/shape.obj -e 0.01

A particularly interesting argument is -load, by which we can load the parameters and trajectory of a previous experiment. When using -load, the order of arguments does matter: every argument after -load will overwrite the loaded one. For example,

./swept-volumes-gui -i data/armadillo.obj -load data/experiments/experiment-name/

will ignore the -i data/armadillo.obj part and load whichever input was used in experiment-name experiment. However,

./swept-volumes-gui -load data/experiments/experiment-name/ -i data/armadillo.obj 

will recreate experiment-name but with the armadillo as input. We can even add new keyframes when loading a previous experiment, or run the same experiment with a finer grid size:

./swept-volumes-gui -load data/experiments/experiment-name/ -e 0.01 

Known Issues

This released code uses marching cubes as a surface generation algorithm, while our paper examples use dual contouring. I plan on adding dual contouring functionality to this repository soon when I manage to clean our original research code :-). All other elements in the algorithm are reproduced here exactly as were used to produce the examples in our paper.

Please do not hesitate to contact [email protected] if you find any issues or bugs in this code, or you struggle to run it in any way.

swept-volumes's People

Contributors

sgsellan 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.