Skip to main content
1 of 2

Combining cubes Issue in Marching Cubes

I was trying to implement the marching cubes and combine every little cube this way:

  • I get a cube of vertices depending on their surfaceLevel
  • I look for the ones that are below the surfaceLevel and get the edges that relates to them
  • get a vertice out of the edge using the formula on: http://paulbourke.net/geometry/polygonise/
  • I put every vertex i created based on the edges on mesh.vertices
  • I make the order on mesh.triangles based of the edge number on triTable
  • i combine everything but i get this: problemCombining

Here's my code: https://pastebin.com/jqetCk8r my guess was that the combine order of every marched little cube is not good.