CorentinDumery / garment-flattening

37 stars 8 forks source link

GLX: Failed to create context #1

Open myosotis-rain opened 3 months ago

myosotis-rain commented 3 months ago

Hi - The below text show up after entering the last few commands. Is there anyway to fix the GLFW library not being initialized? Thanks!

ubuntu@ubuntu:~/garment-flattening/build$ ./woven_viz 3154, 3 6022, 3 Removing unref vertices: 3154 down to 3154 Boundary size: 284 GLX: Failed to create context: GLXBadFBConfigThe GLFW library is not initializedThe GLFW library is not initializedThe GLFW library is not initializedSegmentation fault (core dumped)

CorentinDumery commented 3 months ago

Hi @sophiaxin7, did you run git submodule update --init --recursive? GLFW should be in garment-flattening/lib/libigl/external/glfw.

myosotis-rain commented 2 months ago

hi CorentinDumery! Thank you so much for your response. It ended up working on another computer, not sure if it is something with a virtual machine on Macbook.

We encountered a new problem when importing files, it gives this ERROR: Removing unref vertices: 42517 down to 0 Boundary size: 0 ERROR: wrong topology, number of boundaries = 0 (should be 1) Segmentation fault (core dumped)

wondering if there are any specific requirements for the imported file? Thanks again!

CorentinDumery commented 2 months ago

The real problem here seems to happen at "Removing unref vertices: 42517 down to 0". Can you check your input mesh is correct? Are the vertices referenced in the faces? Feel free to share the mesh with me, I can have a look.

myosotis-rain commented 2 months ago

Thank you so much! I'm currently working with these 2 files exported from clo3D, which both experience the same error. The vertices seems to be referenced though? git doesn't support obj files so I uploaded them to a public drive (https://drive.google.com/drive/folders/1Z8y06Oz2STNuyKlg8o1gDhkNPvCTdjmA?usp=sharing). Just want to thank you so much again for being so responsive and helpful and also for this wonderful app!

CorentinDumery commented 2 months ago

No worries! So I see two problems. 1) It's a quad mesh, and this library works with triangle meshes. I'm not sure how libigl's obj reader handles them, but to be safe can you please triangulate the faces (eg in Blender)? 2) For foldedArmTest, it has a tubular topology, so it's probably not going to work, and even if it did it would only produce a flat torus. Try cutting it into patches with disk topology, this can be done in Blender too.

myosotis-rain commented 2 months ago

Thank you so much for your kind response!! It is so wonderful. Triangulating the faces allowed the models to work in the app. We were trying to set up the app on another computer but it keeps getting stuck on the last step, wondering if there are any hardware requirements for the app to be able to run on a Linux virtual machine?

Also, there are sometimes 700+ boundaries although the model has one clear UV cut, and the other faces should be connected, we were wondering what type of edges/something else does the app read as boundaries.

Thank you so much again and all the blessings!

CorentinDumery commented 2 months ago

"We were trying to set up the app on another computer but it keeps getting stuck on the last step" Which step? What's the error?

"there are sometimes 700+ boundaries" Is it the same mesh as before? If so, point 2 still holds. Feel free to share the new mesh if you have modified it. The app gets the boundary by looking at which edges appear only once, I think.

myosotis-rain commented 2 months ago

Hi Corentin Dumery - Thank you so much! We have it solved. Turns out we had the ubuntu system 24.04 installed but it needed 22? Really appreciate your kind help!!

Have another quick question regarding the values for the stress map - is there some specific unit that the "-0.5" and "0.5" use?

Screenshot 2024-06-19 at 14 46 26

And also which part is supposed to refer to the most stretch? Thank you so much and really appreciate again!

Best,

CorentinDumery commented 1 month ago

I'll try Ubuntu 24.04 when I upgrade this summer, thanks for letting me know.

This refers to the stretch as defined in the paper, which you can find here. You can also have a look at how it's computed in src/param/metrics.cpp. The ideal stretch is 0, -0.5 means the mesh is compressed significantly, and 0.5 means it is extended. 0 is the ideal value.