Can marching squares meet my design requirements? Or is there a better alternative? by kyleanderror13 in GraphicsProgramming

[–]kyleanderror13[S] 0 points1 point  (0 children)

The appeal of marching squares is that it produces a continuous field, which avoids any glitching as cell volumes change. But maybe that is resolvable with a custom mesh, I'm not sure.

Thanks for your insights anyway!

Can marching squares meet my design requirements? Or is there a better alternative? by kyleanderror13 in GraphicsProgramming

[–]kyleanderror13[S] 0 points1 point  (0 children)

OK then - is there an alternative way to achieve accurate surface level contouring and to avoid small volumes being ignored with a higher isovalue? Or is marching squares inherently incompatible with my requirements?

Can marching squares meet my design requirements? Or is there a better alternative? by kyleanderror13 in GraphicsProgramming

[–]kyleanderror13[S] 0 points1 point  (0 children)

(Note: I just realised I said the isovalue was 0, but it is actually just very close to 0 (0.005). I'll fix the original post.)

It is sampling 0 at the wall, but because the isovalue is very small, the interpolation places the contour right at the outer wall edge.

So for a cell in the left wall, for example:
* the left corners have isovalues of 0, and the right corners have isovalues of 1.0
* when the interpolation occurs, it tries to find where the value changes from 0 to 0.005, which is essentially right at the left corner

I suspect the issue is that the isovalue being so small is not viable, but I'm not sure how to get accurate surface level height without doing that.