BrunoLevy / geogram

a programming library with geometric algorithms
Other
1.9k stars 129 forks source link

GEO::mesh_make_atlas() very slow #38

Closed cdcseacave closed 1 year ago

cdcseacave commented 2 years ago

I finally was able to call and extract all data I need from GEO::mesh_make_atlas() however when trying it on any real mesh (number of faces > 500k) the method becomes very slow, basically unusable in any real wold application. Is there something I do wrong in compiling the library or the function in known to be slow?

Update: I tested the functionality in GraphiteThree and same problem.

BrunoLevy commented 2 years ago

That's because we need to pre-segment the mesh. For now, the algorithm tries to parameterize each part, then iteratively splits the parts if there were overlaps or too much distortion, so for a large mesh it will do many many chart parameterization / splittings. I'll add pre-segmentation shortly (I have it somewhere ...)

(The current version is for a scenario where you first generate a low poly mesh from a high poly one, then parameterize the low poly mesh, and generate normal maps, this is why there was no performance issue / need to presegment).

cdcseacave commented 2 years ago

sounds great, it would be of great help if you can add that missing part too; thank you!

BrunoLevy commented 2 years ago

Just for my own curiosity, what is your usage scenario / application ?

cdcseacave commented 2 years ago

mesh texturing in a photogrammetry pipeline like OpenMVS

cdcseacave commented 2 years ago

I also get a lot of messages like this, is it normal?

| o-[ABF++       ] Warning: Could not initialize SuperLU extension            |
OpenNL error in nlOpenDLL(): Not implemented
BrunoLevy commented 1 year ago

Some news:

cdcseacave commented 1 year ago

Thank you for the update! I implemented my own mesh segmentation and parametrization, so no hurry on this. I'm testing on Windows 10 x64 with vcpkg port (I was not able to build from the git sources). So it would be great if you have a look at the vcpkg port and update it: https://github.com/microsoft/vcpkg/tree/master/ports/geogram

BrunoLevy commented 1 year ago

I have no experience with vcpkg, but I'll take a look ... What happened when you tried to buid from git sources ? Did you follow the protocol explained here: https://github.com/BrunoLevy/geogram/wiki/compiling_Windows ?

cdcseacave commented 1 year ago

I do not remember what went wrong, but I tried now again the instructions in your link and it worked though it would be even better if you can integrated it in vcpgk

BrunoLevy commented 1 year ago

Fixed in v1.8.3rc that has new mesh_make_atlas() function (github repo up to date if you want to test)

cdcseacave commented 1 year ago

thank you!