Open flycast opened 4 years ago
I am also pretty new to it but as far as i understand it, the Triangles are just indices who tell the mesh, which 3 Points in your List belong to one Triangle (via Indexes). They are saved in a List
List<Index3i> triangleList = new List<Index3i>();
for (int i = 0; i < pointCloud.Count - 2; i += 3)
{
Index3i tempTriangle;
tempTriangle = new Index3i(i, i + 1, i + 2);
triangleList.Add(tempTriangle);
}
But again, i am also quite new to this, but this works for me, as my Points are ordered correctly in the list. I hope this gives you at least some kind of understanding which might help with your porblem
@FloP93 - Thanks for that. The big issue is what vertices belong together. That is the major part of the problem I need to solve. It seems the best way to solve that is using the Delaunay algorithm. I don't seem to find anything free that does this in 3D (as far as I can tell). I don't mind paying for a library that does this once I prove the concept I am working on. Matlab and some others promise this.
You can use Poisson Surface reconstruction as a Command Line interface. But you need to find a way to compute normals.
you could try http://www.gradientspace.com/tutorials/2018/9/14/point-set-fast-winding if you are adventurous. Poisson Reconstruction probably works more reliably though.
To estimate normals you could use a PointAABBTree3 TreeTraversal to find k-nearest-neighbours, and then OrthogonalPlaneFit3 to fit a plane, that gives you a normal. They aren't necessarily consistent though, so then you need to do some kind of propagation to try to get them pointing in the same direction locally.
(this is all I can help with, good luck)
Does it mean that tutorial of fast point windingsworks only with pointclouds that have normals? I am talking about lion sculpture
I have a set of 3D points. I need to convert them into a triangulation/mesh. I may be a little confused here about my terminology. I see you fort tutorial where you cover the meshBuilder. It looks like I need to give a set or points and a set of triangles that have already been built. I do not have triangles. How do I build a set of triangles (Delauney) from the points?