Skip to content

Save output directly as a mesh#12

Open
MeeseBees wants to merge 2 commits into
HTDerekLiu:mainfrom
MeeseBees:main
Open

Save output directly as a mesh#12
MeeseBees wants to merge 2 commits into
HTDerekLiu:mainfrom
MeeseBees:main

Conversation

@MeeseBees

Copy link
Copy Markdown

Dear Hsueh-Ti Derek,

I am new to Github, so excuse me if this is the incorrect/unusual way of asking. I was trying to use your algorithm and could not find an easy way to directly save a coarsened mesh (other than the edge length and face lists). Therefore, I copied the main.cpp from the 01_prolongation_scalar folder (since I would like to study the effect of area_weight) and added an argument for saving the output as a .stl file with my little C++ knowledge. This could be easily modified to save .obj files.

Best regards,
Mees Dieperink

PS Do you have any experience with differences between your method and QEM simplification for meshes with >2M vertices?

@HTDerekLiu

Copy link
Copy Markdown
Owner

Thanks for writing the PR.

I was trying to use your algorithm and could not find an easy way to directly save a coarsened mesh

It is true that our output cannot be easily converted to the traditional (V,F) format. Specifically, the output STL mesh you have will NOT give you the same edge lengths as the edge length list in the code. For instance, the (V,F) mesh may look like this
image
but the actual edge length in the code should be closer to the length of the curved path in here
image
This is a double edged sword that it limits the ability to visualize the coarsened mesh, but gives us the flexibility to obtain amazing computation advantages. This is also a reason why we didn't provide a easy function to output (V,F) because there isn't an easy way to do so.

Do you have any experience with differences between your method and QEM simplification for meshes with >2M vertices?

The above answer also implies that the result will be VERY different from QEM. QEM is designed for visualization and ours is designed for computation. Here is a reference QEM result of the same mesh for your reference
Screenshot 2024-01-05 at 1 23 32 PM

@MeeseBees

MeeseBees commented Jan 15, 2024

Copy link
Copy Markdown
Author

Thanks for the fast reply (unlike mine now).

Perhaps I should have specified what I am trying to do, because it is indeed for a computation, and not visualization, project:

I am trying to perform electromagnetic simulations with a Matlab toolbox that takes vertices and faces as input. The computational/storage demand scales heavily with the mesh complexity. Therefore, I am trying to simplify the meshes first. I noticed that with QEM I either lose quite some surface area or quite some volume when remeshing. I would like to compare your method with QEM in terms of surface/volume loss (which is tricky, since I sometimes have to simplify from >2M to ~500 vertices).

I am aware of the fact that by remeshing I lose the curved properties that are hidden in the edge lengths, but I think this is an unavoidable price I pay. Do I understand your explanation on the edge lengths correctly? And, do you have any ideas/suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants