Giter VIP home page Giter VIP logo

intrinsic-simplification's People

Contributors

htderekliu avatar markgillespie 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

Watchers

 avatar  avatar  avatar  avatar

intrinsic-simplification's Issues

Coarsening the mesh with border edges creates issues

Hi. First of all congrats for the awesome paper and for sharing the code with the community. I'm trying to to downsample a T-shirt mesh with the provided code and I'm not sure if this is an issue or it is a theoretical limitation of the method.

I've made a slight modification to the multigrid code for downsampling the mesh multiple times. The input mesh is this one:

Screenshot from 2023-12-07 13-43-46

Downsampling it once produces the result in the image below. The yellow outline shows which edges are border edges.
Screenshot from 2023-12-07 13-13-16

The image below illustrate what happens If I downsample the mesh above two times (it correctly works for downsampling just once). Notice how the method is able to properly preserve the border edges on the collar of the T-tshirt, but is unable to do so for the wrist border edges.
Screenshot from 2023-12-07 13-12-18

The original T-shirt mesh along with these two downsampled versions can be found here:
example_tshirt.zip

The code that I've used for prolongation is very simple modification of the multigrid coarsening:

MatrixXd VO;
MatrixXi F, FO;
{
    igl::read_triangle_mesh(filename, VO, FO);
}

// Initialize intrinsic information
MatrixXi G;    // glue map
MatrixXd l;    // edge lengths
MatrixXd A;    // angular coordinates
MatrixXi v2fs; // vertex to faceside map
build_intrinsic_info(VO, FO, G, l, A, v2fs);
F = FO;

vector<pair<MatrixXd, MatrixXi>> meshes;
meshes.reserve(num_levels + 1);
meshes.push_back(pair<MatrixXd, MatrixXi>(VO, FO));

for(int i = 1; i <= num_levels; i++) {
    VO = meshes.back().first;
    FO = meshes.back().second;
    F = FO;
    int num_coarse_vertices = VO.rows() * downsampling_factor;
    
    MatrixXd BC;
    vector<vector<int>> F2V;
    cout << "Number of original vertices " << VO.rows() << "." << endl;
    coarsen_mesh(VO.rows() - num_coarse_vertices, weight, F, G, l, A, v2fs, BC, F2V);
    cout << "Number of coarse vertices " << num_coarse_vertices << "." << endl;
    
    // removed unreferenced vertices
    map<int, int> IMV, IMF;
    VectorXi vIdx, fIdx;
    remove_unreferenced_intrinsic(F, G, l, A, v2fs, F2V, IMV, IMF, vIdx, fIdx);
    
    // create a slice of the original vertices 
    MatrixXd V;
    igl::slice(VO, vIdx, 1, V);

    // get prolongation
    SparseMatrix<double> P;
    get_prolongation(F, BC, F2V, IMV, P);

Any thoughts about this?

Restrictions on the input mesh

Can you please tell me what are the requirements of the input mesh? like it should be watertight, manifold, triangular, etc.

Compilation problem in windows environment

I configure the code based on CLion, and the operating system is windows, but there are some problems with the code during the build process. I want to know how your code should be configured in the windows environment.

image

image

Issue with Coarsening

Hi, I am running the first Example 00 where I attempt to refine the mesh with 80% compression. I encountered this visualization with orange spots in between, accompanied by text stating "wrong edge length." Could someone please explain what this means exactly, and why there are patches of yellow color?
error

Blender vs MeshLab

I tried to run the 00 algorithm on meshes with high vertices (>200K). I first opened the mesh in Blender, exported it, and ran the 00 algorithm on it and it was working! I repeated the same procedure using Meshlab and the algorithm was not working.

I tried this experiment on some other meshes with high vertices (>200K) and the same thing was happening! Then I tried with meshes with fewer vertices (<10K) and the 00 algorithm was working fine for both Blender and Meshlab exports!

Do you know the reason? Both the meshes (exported using Blender and Meshlab) are identical!

always flip to ear error

I am getting this error:
what(): [Error] failed to flip to ear in always_flip_to_ear

Can you please tell me what pre-processing is required for the input mesh?

Mesh simplification algorithm

I am not that good at mesh simplification concepts, my aim is just to simplify the given mesh. You have done great work and also provided the 7 functionalities. I have used 00_coarsening for mesh simplification, but I am confused with others, whether to use them for mesh simplification or not...mainly 01, 04, 05, and 06. Can you please tell me (in the context of only mesh simplification) which one to go for?

Mesh refining run forever

When I am trying to implement 6_delaunay_refinement/, the step of refining before coarsening takes a lot of time (also refining after coarsening) and runs for forever. I am getting results quickly for the sample mesh boxpart.obj but for some big meshes (>30K), this problem is coming. Any solution?

Also, I am getting this error for dragon_fat.obj
malloc(): invalid next size (unsorted)
Aborted (core dumped)

I tried mesh simplification for dragon_fat.obj using Blender and reduced the vertices to 5.5K and it was working with --refinement_time=BEFORE and I got same error as above with --refinement_time=AFTER! Can you please help with this?

Assertion failed error with my personal model

Hi, I read your paper from siggraph 2023 and I am very interested in your work. So I ran your program but some test cases failed with the following assertion:

Assertion failed: is_same_face_side(twin(G,fs_twin), GHOST_FACE_SIDE), file D:\intrinsic-simplification\src\flatten_boundary_vertex_and_cost.cpp, line 208

I wonder if this assertion is the requirement of the following steps or this is just my personal model's error?
Thanks a lot!

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.