fast-winding-number-soups icon indicating copy to clipboard operation
fast-winding-number-soups copied to clipboard

Algorithm does not work as expected

Open joeykleingers opened this issue 1 year ago • 6 comments

@alecjacobson I used this fast winding algorithm to voxelize a surface mesh that I have, but it keeps resulting in fast winding numbers that don't seem to indicate whether the vertices are inside or outside the surface mesh. The fast winding numbers have a range of about -1 to about 1.5, and when I threshold out anything under 0.5, I still am seeing fast winding numbers that are outside the surface mesh and above 0.5.

The STL file that I used is downloadable using the following link:

https://drive.google.com/file/d/1L6mZyzNAQzPHztDB2vwfrfB3cCaJufD_/view?usp=share_link

joeykleingers avatar Nov 08 '23 19:11 joeykleingers

Is that the input mesh? It's faces are inconsistently oriented

On Wed, Nov 8, 2023, 2:20 PM Joey Kleingers @.***> wrote:

@alecjacobson https://github.com/alecjacobson I used this fast winding algorithm to voxelize a surface mesh that I have, but it keeps resulting in fast winding numbers that don't seem to indicate whether the vertices are inside or outside the surface mesh. The fast winding numbers have a range of about -1 to about 1.5, and when I threshold out anything under 0.5, I still am seeing fast winding numbers that are outside the surface mesh and above 0.5.

The STL file that I used is downloadable using the following link:

https://drive.google.com/file/d/1L6mZyzNAQzPHztDB2vwfrfB3cCaJufD_/view?usp=share_link

— Reply to this email directly, view it on GitHub https://github.com/GavinBarill/fast-winding-number-soups/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARDJGPJC33APU2A4FVWPBTYDPLPDAVCNFSM6AAAAAA7DMW2WSVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4DIMRUHEYDSNQ . You are receiving this because you were mentioned.Message ID: @.***>

alecjacobson avatar Nov 08 '23 20:11 alecjacobson

Sorry, here's the same input mesh, but with consistent normals... the algorithm still outputs fast winding numbers that I wouldn't expect. Maybe I'm just misunderstanding what the fast winding numbers mean and how to use them to interpret which are inside the mesh and which are outside?

https://drive.google.com/file/d/1nCPMV7_iNirYXAmQ8b9F2kvSyM62-X8M/view?usp=share_link

joeykleingers avatar Nov 09 '23 16:11 joeykleingers

@alecjacobson Do you know of an algorithm that does not require oriented triangles as a requirement?

imikejackson avatar Nov 09 '23 18:11 imikejackson

@joeykleingers, This new mesh looks good. I'm not seeing any problems though. If I run the 717 tutorial it's correctly classifying the points on the inside. Could you clarify what you're observing?

mesh Screen Shot 2023-11-10 at 9 44 12 AM

query points Screen Shot 2023-11-10 at 9 44 15 AM

inside points Screen Shot 2023-11-10 at 9 44 18 AM

alecjacobson avatar Nov 10 '23 14:11 alecjacobson

@alecjacobson Were you on the latest commit on master for both the WindingNumber and fast-winding-number-soups repos when you ran that? On an x86 machine? Trying to see if I can replicate that on my end. I am using an Apple Silicon Mac which is ARM, but I can certainly try it on an x86 machine.

joeykleingers avatar Nov 13 '23 23:11 joeykleingers

@alecjacobson Is this the branch/code you are using? https://github.com/libigl/libigl/tree/activeset/tutorial/717_FastWindingNumber

We are on ARM macOS so we had so back off some commits from this repo to get the compatibility. Maybe there were some fixes that we also got rid of.

Does the FastWindingNumber require oriented triangles?

imikejackson avatar Nov 17 '23 16:11 imikejackson