Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Sparse Density Map Marching Cube #215

Open
losanc opened this issue Sep 17, 2024 · 1 comment
Open

Question about Sparse Density Map Marching Cube #215

losanc opened this issue Sep 17, 2024 · 1 comment

Comments

@losanc
Copy link

losanc commented Sep 17, 2024

Hi,

I have a question about the marching cube step when using sparse density map. In the code here

            // We want to find edges that cross the iso-surface,
            // therefore we can choose to either skip all points above or below the threshold.
            //
            // In most scenes, the sparse density map should contain more entries above than
            // below the threshold, as it contains the whole fluid interior, whereas areas completely
            // devoid of fluid are not part of the density map.
            //
            // Skip points with densities above the threshold to improve efficiency
            if point_value > iso_surface_threshold {
                return;
            }

So it skips all the points with larger values. For points with lower values, it finds the neighbor, and check if it cross the threshold.
But for edged like this

0----------value larger than threshold

So, one side of the edge has value 0. The check will be skipped, because it's not in the density map. On the other side has large enough value, and it will be skipped as well.

In the end, this triangle vertex will be skipped, though it should be a vertex here

I think this is a rare case, but with very small threshold, this can happen

@w1th0utnam3
Copy link
Member

Hi, thanks for the message. I think in my implementation of the surface reconstruction pipeline, this case should not happen, as I evaluate the particle kernels with a radius that is basically cellsize * ceil(support_radius/cellsize) (see here). Thus, there should always be a density = 0 ring around the fluid. I guess the comments and documentation of the marching cubes function should be updated to highlight that this is expected.

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

No branches or pull requests

2 participants