htderekliu / intrinsic-simplification Goto Github PK
View Code? Open in Web Editor NEWSurface Simplification using Intrinsic Error Metrics
License: MIT License
Surface Simplification using Intrinsic Error Metrics
License: MIT License
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:
Downsampling it once produces the result in the image below. The yellow outline shows which edges are border edges.
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.
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?
Can you please tell me what are the requirements of the input mesh? like it should be watertight, manifold, triangular, etc.
Hello, I read your paper from siggraph 2023 and it is an amzing project for me. So I ran your program but some test cases failed with the following assertion:
This is the .obj file:
House.zip
Thanks for your tips!
Please let me know how to download the output model
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?
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!
I wanted to know if we can only use absolute Gaussian curvature to remove the vertex.
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?
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?
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?
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.