Giter VIP home page Giter VIP logo

mesh2sdf-mp's Introduction

Mesh2SDF-MP

Most contents copied from mesh2sdf project, and use python multiprocessing for acceleration.


Downloads PyPI

Converts an input mesh to a signed distance field. It can work with arbitrary meshes, even non-watertight meshes from ShapeNet.

mesh2sdf is used in our paper Dual Octree Graph Networks (SIGGRAPH 2022) to generate the training data. Please cite our paper if you find the code useful for your research.

Installation

mesh2sdf depends on pybind11, and C++ compilers are needed to build the code. Supported compilers are listed here.

  • Install via the following command:

    pip install mesh2sdf
  • Alternatively, install from the source code via the following commands.

    git clone https://github.com/wang-ps/mesh2sdf.git
    pip install ./mesh2sdf

Example

After installing mesh2sdf, run the following command to process an input mesh from ShapeNet:

python example/test.py

Example of a mesh from ShapeNet

How does it work?

  • Given an input mesh, we first compute the unsigned distance field with the fast sweeping algorithm implemented by Christopher Batty (SDFGen). Note that the unsigned distance field can always be reliably and accurately computed even though the input mesh is non-watertight.

  • Then we extract the level sets with a small value d with the marching cube algorithm. The extracted level sets are represented with triangle meshes and are guaranteed to be manifold.

  • There exist multiple connected components in the extracted meshes, and we only keep the mesh with the largest bounding box.

  • Compute the signed distance field again with the kept triangle mesh as the final output. In this way, the signed distance field (SDF) is computed for a non-watertight input mesh.

mesh2sdf-mp's People

Contributors

qsun1 avatar

Stargazers

 avatar

Watchers

 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.