Coder Social home page Coder Social logo

liminchen / optcuts Goto Github PK

View Code? Open in Web Editor NEW
266.0 21.0 44.0 172.61 MB

OptCuts, a new parameterization algorithm, jointly optimizes arbitrary embeddings for seam quality and distortion. OptCuts requires no parameter tuning; automatically generating mappings that minimize seam-lengths while satisfying user-requested distortion bounds.

Home Page: http://www.cs.ubc.ca/labs/imager/tr/2018/OptCuts/

License: MIT License

C++ 89.19% Python 2.21% CMake 1.01% HTML 4.45% C 2.34% MATLAB 0.10% Mako 0.04% Shell 0.34% Ruby 0.01% CSS 0.12% Roff 0.12% JavaScript 0.06% M 0.01%
computer-graphics geometry-processing parameterization texture-mapping constrained-optimization siggraph-asia

optcuts's People

Contributors

liminchen 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

optcuts's Issues

Initial Energy Problem

When I run a big object (no connected component , not high genus surface , closure surface) , the initial energy's value is to be nan sometimes . How do i solve this problem ?

please clean up the mesh and retry.

when i run ' python batch.py', there is a bug:
['tmp.obj']
igl::opengl::glfw::Viewer usage:
[drag] Rotate scene
A,a Toggle animation (tight draw loop)
F,f Toggle face based
I,i Toggle invert normals
L,l Toggle wireframe
O,o Toggle orthographic/perspective projection
T,t Toggle filled faces
Z Snap to canonical view
[,] Toggle between rotation control types (trackball, two-axis
valuator with fixed up, 2D mode with no rotation))
<,> Toggle between models
; Toggle vertex labels
: Toggle face labels
Offline optimization mode
use b_d = 4.1
bijectivity ON
random 2-edge initial cut for closed surface
No UV provided, initialized to all 0
area of triangle No.18564 (0-index) is 0
vertex indices (0-index) are 9987 9970 9494
area of triangle No.29282 (0-index) is 0
vertex indices (0-index) are 15573 15574 15575
area of triangle No.43411 (0-index) is 0
vertex indices (0-index) are 21559 21561 21580
area of triangle No.46797 (0-index) is 0
vertex indices (0-index) are 23202 24043 24101
area of triangle No.51016 (0-index) is 0
vertex indices (0-index) are 26011 25138 26114
area of triangle No.75614 (0-index) is 0
vertex indices (0-index) are 38329 37490 38330
area of triangle No.101009 (0-index) is 0
vertex indices (0-index) are 50434 50424 50217
area of triangle No.112803 (0-index) is 0
vertex indices (0-index) are 56312 56893 56124
area of triangle No.113286 (0-index) is 0
vertex indices (0-index) are 56324 57234 56304
area of triangle No.116316 (0-index) is 0
vertex indices (0-index) are 58626 58625 58582
area of triangle No.118220 (0-index) is 0
vertex indices (0-index) are 59808 58427 58424
area of triangle No.118931 (0-index) is 0
vertex indices (0-index) are 58522 58524 58371
area of triangle No.128351 (0-index) is 0
vertex indices (0-index) are 64314 64117 64128
please clean up the mesh and retry.

can you tell me how to solve? thanks!

build fail

error when run "python build.py": '"mkdir build' 不是内部或外部命令,也不是可运行的程序

Mesh requirements to run OptCuts

Hi,

I've few scan meshes that I've remeshed and now I'm trying to run OptCuts to generate uv coordinates.

At first I got the error:

igl::opengl::glfw::Viewer usage:
  [drag]  Rotate scene
  A,a     Toggle animation (tight draw loop)
  F,f     Toggle face based
  I,i     Toggle invert normals
  L,l     Toggle wireframe
  O,o     Toggle orthographic/perspective projection
  T,t     Toggle filled faces
  Z       Snap to canonical view
  [,]     Toggle between rotation control types (trackball, two-axis
          valuator with fixed up, 2D mode with no rotation))
  <,>     Toggle between models
  ;       Toggle vertex labels
  :       Toggle face labels
Offline optimization mode
input mesh contains non-manifold edges or vertices
please cleanup the mesh and retry

So I took the mesh opened it in meshlab and removed the non manifold-edges and vertices. Then I run it again and I'm getting the error:

igl::opengl::glfw::Viewer usage:
  [drag]  Rotate scene
  A,a     Toggle animation (tight draw loop)
  F,f     Toggle face based
  I,i     Toggle invert normals
  L,l     Toggle wireframe
  O,o     Toggle orthographic/perspective projection
  T,t     Toggle filled faces
  Z       Snap to canonical view
  [,]     Toggle between rotation control types (trackball, two-axis
          valuator with fixed up, 2D mode with no rotation))
  <,>     Toggle between models
  ;       Toggle vertex labels
  :       Toggle face labels
Offline optimization mode
use b_d = 4.1
bijectivity ON
random 2-edge initial cut for closed surface
Error: Numerical issue.
***Element inversion detected: -0.0697798 < 0
mesh triangle count: 61691

But I have no clue what that error means. Is there's a specifc requirement for the mesh, because I can't figure how to clean up those scans after remeshing to lower the polycount and retopologize in order to run your tool.

Regards

Hessian is semi-definite

Sometimes the rounding error might cause a linear solver that requires strict positive definiteness to crash. However the Eigen::SimplicialLDLT we use by default works just fine.

A simple trick that one can do is to add an epsilon * identitiyMatrix to each of the projected element Hessian, so that the rounding error won't make the global Hessian indefinite.
Similarly, one can also blend the global Hessian with an epsilon scaled lumped mass to help with this issue.

Cmake error about TBB

CMake Error at CMakeLists.txt:33 (find_package):
By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "TBB", but
CMake did not find one.

Could not find a package configuration file provided by "TBB" with any of
the following names:

TBBConfig.cmake
tbb-config.cmake

Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR"
to a directory containing one of the above files. If "TBB" provides a
separate development package or SDK, be sure it has been installed.

software architecture improvement

  • move dual solve from main.cpp into another file and make the primal-dual control flow more clear in main.cpp;
  • move topology descent steps from class TriMesh into another file and make the discrete-continuous optimization control flow more clear in optimizer.cpp;
  • handle !!!, TODO, DEBUG, TEST tags in the code;

does not support input meshes with multiple connected components

Can identify it and initialize UV maps for each connected component, locating the charts without overlaps, and start OptCuts.
Note that if the components are generated by pre-cutting a closed mesh, then in OptCuts those boundaries won't be merged anyway, even if we support 4-vertex merge operation.

performance optimization

  • Eigen dynamic-size matrix -> static-size;
  • Add std::vector isFixedVert to avoid binary search on std::set fixedVert;
  • Local update for mesh features and Hessian matrix data structure rather than recompute whole;
  • Compute Hessian and gradient together so that certain variables can be shared;
  • Improve multi-threading
    • Parallel energy computation
    • Parallel gradient entry computation and vector assembly
    • Parallel Hessian matrix assembly
    • other code that's reasonable to be parallelized...
  • SIMD optimization
  • GPU optimization
  • Algorithmic improvement (see our paper for more detail)

does not support input mesh with more than one boundary

  • Needs to initialize the UV with multi-boundary Tuttes embedding.
  • We didn't explicitly support high-genus surfaces with boundaries either.
    (Note that even if the boundaries are generated by semantically pre-cutting a closed mesh, in OptCuts those boundaries won't be merged anyway, even if we support 4-vertex merge operation.)

more adaptive tolerance on gradient squared norm

Although we normalized the distortion energy Ed, the gradient of this energy should still be relevant to the surface area.
It would be meaningful to see whether an adaptive tolerance on the gradient norm like the one in BCQN would further improve the adaptivity of the stopping criteria of geometry steps.

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.