Workflow of the Naive Surface Nets algorithm

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?

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).

• @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 Jan 6, 2018 at 17:19

1 Answer

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).

• Very nice @StinkyShunk ! I came up to this already too but this explains it well tp. I've planned to answer the question myself but now I think It'll accept your answer and post mine according 3D as additional information too. Mar 6, 2017 at 18:33
• After all, thank you very much @StinkySkunk. I really hope this helps other people trying to understand it out there too. Mar 6, 2017 at 19:14
• :) I am happy I could confirm your thinking. Please do post your more thorough answer as well for the benefit of others! Mar 7, 2017 at 0:07
• 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? Nov 30, 2017 at 6:52
• Also, how do you form a quad/triangle? Nov 30, 2017 at 7:42