3
$\begingroup$

This question is comming from ComputerScience after suggestion

I'm trying to understand the Naive Surface Nets algorithm which is related to surface generation out of Voxels. I've learned of it here

So far I understood that the naive surface nets algorithm calculates the "optimal" edge crossings for a given input. Problem is that I don't understand how it's supposed to calculate the edge crossings compared to the marching cubes algorithm. If the input data is represented in binary values (only one and zero) like for marching cubes algorithm shouldn't the computation of the edge crossings have the same results?

I suppose a step by step showcase of what the algorithm does for aquiring the surface of 2D sample voxels data would help me a lot understanding it. Sample code is fine too but is not a must have.

For example for this data the marching cubes algorithm gives as result the image show below (the lines). Would the naive surface nets algorithm return the same result?

Marching squares algorithm result

Where red stands for binary 1 and blue for binary 0 asuming each voxel has the same space between each other (as always I think).

$\endgroup$
1
  • $\begingroup$ @StinkySkunk I couldn't have said it better myself. I wrote a Unity3D implementation of Naive Surface Nets in C# and I tried to document my code as thoroughly as I could. Maybe something in there will help: github.com/TomaszFoster/NaiveSurfaceNets $\endgroup$ Jan 6, 2018 at 17:19

1 Answer 1

4
$\begingroup$

I think the basic idea, as explained in the article to which you linked, is to associate a vertex (shown in light blue) to each square that intersects the surface, with the vertex positioned at the average of the adjacent edge crossings (shown in gray). Then connect up with dual edges (shown also in light blue).enter image description here

$\endgroup$
4
  • $\begingroup$ After all, thank you very much @StinkySkunk. I really hope this helps other people trying to understand it out there too. $\endgroup$ Mar 6, 2017 at 19:14
  • $\begingroup$ :) I am happy I could confirm your thinking. Please do post your more thorough answer as well for the benefit of others! $\endgroup$ Mar 7, 2017 at 0:07
  • $\begingroup$ I can't imagine how this works in 3d, can you enlighten on that? Should you simply connect the vertex for each cube to the adjacent cubes that shared a crossing? $\endgroup$
    – CarlLee
    Nov 30, 2017 at 6:52
  • $\begingroup$ Also, how do you form a quad/triangle? $\endgroup$
    – CarlLee
    Nov 30, 2017 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.