<p>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).<a href="https://i.sstatic.net/v6qSj.png" rel="noreferrer"><img src="https://i.sstatic.net/v6qSj.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-03-06T19:14:43.197Z
After all, thank you very much @StinkySkunk. I really hope this helps other people trying to understand it out there too.
realvictorprm
CC BY-SA 3.0
2017-03-07T00:07:21.773Z
:) I am happy I could confirm your thinking. Please do post your more thorough answer as well for the benefit of others!
StinkySkunk
CC BY-SA 3.0
2017-11-30T06:52:32.053Z
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?
CarlLee
CC BY-SA 3.0
2017-11-30T07:42:27.557Z
Also, how do you form a quad/triangle?
CarlLee
CC BY-SA 3.0
2017-03-06T18:01:39.370Z
2017-03-06T18:01:39.370Z
StinkySkunk
<p><strong>This <a href="https://www.google.de/amp/s/0fps.net/2012/07/12/smooth-voxel-terrain-part-2/amp/" rel="nofollow noreferrer">question</a> is comming from ComputerScience after suggestion</strong></p>

<p>I'm trying to understand the Naive Surface Nets algorithm which is related to surface generation out of Voxels. I've learned of it <a href="https://www.google.de/amp/s/0fps.net/2012/07/12/smooth-voxel-terrain-part-2/amp/" rel="nofollow noreferrer">here</a></p>

<p>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?</p>

<p>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.</p>

<p>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?</p>

<p><a href="https://i.sstatic.net/5Fi9E.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5Fi9E.png" alt="Marching squares algorithm result"></a></p>

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

CC BY-SA 3.0
2018-01-06T17:19:23.753Z
@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: https://github.com/TomaszFoster/NaiveSurfaceNets
Tomasz Lloyd
<algorithm>
Workflow of the Naive Surface Nets algorithm
realvictorprm
# Workflow of the Naive Surface Nets algorithm

(Asked by: username_0 on 2017-03-03)

**This [question](https://www.google.de/amp/s/0fps.net/2012/07/12/smooth-voxel-terrain-part-2/amp/) 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](https://www.google.de/amp/s/0fps.net/2012/07/12/smooth-voxel-terrain-part-2/amp/)

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](https://i.sstatic.net/5Fi9E.png)](https://i.sstatic.net/5Fi9E.png)

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

**Tags:** algorithm

> **Comments:**
> **username_1**: @username_2 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: https://github.com/TomaszFoster/NaiveSurfaceNets  

---

## 1 answers

### Answer by username_2 on 2017-03-06. Score: 4 | Accepted 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).[![enter image description here](https://i.sstatic.net/v6qSj.png)](https://i.sstatic.net/v6qSj.png)

> **Comments:**
> **username_0**: After all, thank you very much @username_2. I really hope this helps other people trying to understand it out there too.  
> **username_2**: :) I am happy I could confirm your thinking. Please do post your more thorough answer as well for the benefit of others!  
> **username_3**: 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?  
> **username_3**: Also, how do you form a quad/triangle?  

---

