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

  • $\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$ – Tomasz Foster Jan 6 '18 at 17:19

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

| improve this answer | |
  • $\begingroup$ 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. $\endgroup$ – Arthur P. R. Mar 6 '17 at 18:33
  • $\begingroup$ After all, thank you very much @StinkySkunk. I really hope this helps other people trying to understand it out there too. $\endgroup$ – Arthur P. R. Mar 6 '17 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$ – StinkySkunk Mar 7 '17 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 '17 at 6:52
  • $\begingroup$ Also, how do you form a quad/triangle? $\endgroup$ – CarlLee Nov 30 '17 at 7:42

Your Answer

