Giter Site home page Giter Site logo

ahdhn / meshimp Goto Github PK

View Code? Open in Web Editor NEW
53.0 5.0 15.0 135.48 MB

A Constrained Resampling Strategy for Mesh Improvement - SGP 2017

License: BSD 2-Clause "Simplified" License

CMake 0.09% C++ 98.85% C 1.06%
meshing mesh-processing sampling simplification non-obtuse

meshimp's Introduction

Mesh Improvement via Sampling:

Implementation and results of "A Constrained Resampling Strategy for Mesh Improvement", Proceedings of Eurographics Symposium on Geometry Processing (SGP) 2017.

Description:

The code includes the implementation for curved surface meshes. This includes the following applications:

  1. Non-obtuse retriangulation: Eliminating obtuse triangles from input mesh while preserving the minimum angle bound, smoothness, and Delaunay property.

	Input (Obtuse triangles in red)        					   Output
  1. Mesh Simplification: Achieving Level of Detail while preserving the angle bound, and triangle quality.

	30K triangles           20K triangles           12K triangles              1.5K triangles
  1. Delauany Sifting: Reducing the number of Steiner points while preserving angle bound, triangle quality, smoothness, and Delaunay property.

		      Input         				     	      Output

The results as presented in the paper in Table 2, Table 3, Table 5 can be found under /data.

Installation:

The code has no prerequisites except CMake (3.6 or higher). The code was developed and tested under Microsoft Visual 12.0 C++11 on Windows 7 (x64).

  • Windows:
    • On CMake GUI, set the source code directory to where the CMakeLists.txt is and set the build directory to where you would like the project to be built. Click Configure followed by Generate followed by Open Project. We specified the generator as "Visual Studio 12 2013 Win64". Other generators should work too.

    • On Visual Studio, Set the Solution Configuration to Release. Under Build menu, click Build Solution. The executable should then be found under /BUILD_DIR/Release.

Usage:

The code relies on switches to specify the right application and objectives to improve as follows:

Command Line Syntax is:

mesh_imp.exe -APP [-tar -sam -smooth -dih -ring -del -minang -maxang] INPUT.obj

-APP could be -sim for Mesh Simplification or -obt for Non-obtuse Retriangulation. The code accepts .obj files that contains only raw vertices (preceded by v) and faces (preceded by f) in addition to comments (preceded by #).

Command Line Switches are:

   -sim      Invokes the Mesh Simplification algorithm on the input mesh
             where the complexity of the input mesh is reduced while
             respecting the specified mesh quality.
             
   -tar      The number followed represents the target number of samples desired
             in the simplified output mesh. If this number is not set, 
             The code will attempt to reduce the samples count as much as possible.

   -obt      Invokes the non-obtuse retriangulation algorithm on the input
             mesh where we attempt to eliminate the obtuse triangles from 
             the input mesh.

   -sam      The number followed represents the number of successive successful
             darts before termination.
	     During the sampling process, we can sample more than one successful
	     sample and pick the best one. The best one can have different objective.
	     In the current implementation, the `best' here is the one with maximum.
	     minimum apex angle across different algorihtms.
             The default is 10 samples.
			 
   -ring     The number followed represents the number of rings (layers)
             taken as background grid for sampling. The default is 3 rings.

   -del      If set, the Delaunay property will be preserved.
             The default is false.

   -minang   The number followed represents the minimum angle preserved.
             The default is set to the minimum angle of the input mesh.
			 
   -maxang   The number followed represents the maximum angle preserved.
             The default is set to the maximum angle of the input mesh.   

   -smooth   If set, the smoothness will be preserved.
             The default is false.
			 
   -dih      The maximum dihedral angle to which the smoothness will be
             preserved.
			 
   -v        Display various statistics throughout the execution.
   
   -h        Display the use message, and quit.

Examples

Non-obtuse Retriangulation:

mesh_imp.exe -obt -sam10 -smooth -dih170 -del -minang  INPUT.obj

Delaunay Sifting:

mesh_imp.exe -sim -sam10 -smooth -dih170 -del -minang -maxang INPUT.obj

Mesh Simplification:

mesh_imp.exe -sim -sam10 -minang -maxang INPUT.obj

Reporting problems:

To report bugs or compilation issue, please file an issue here.

Acknowledgement:

The project was funded by Sandia National Laboratories, Albuquerque, NM.

meshimp's People

Contributors

ahdhn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meshimp's Issues

What parameters?

What parameters were used to generate the davidhead level_1.obj and level_2.obj? I used:

mesh_imp.exe -sim -sam10 -smooth -dih170 -del -minang -maxang -v davidhead.obj

but I get this with holes in it:
image

Also, I'm noticing the triangles are flipped when I import into Unity (see head to the right in the above image), but the original isn't. Is there a way to control that?

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.