Hi, I’m new to OF and my first project uses a Kinect V2 to generate a three dimensional model of a performer which will be textured with a generative shader. Before that, I have to figure out how to get a clean triangulation of the given vertices.
Vertices which aren’t really adjacent to each other are connected by ofMesh resulting in weird, rain like distortions. I tried to compute a sane order of indices, based on Dan Buzzos tutorials on YT but to no avail.
Another try was given to ofxDelaunay, but it didn’t draw anything in my setup and the triangulate method stalls my update loop. It might be to slow for the amount of vertex data I provide it with.
walking thru the code I cant follow exactly how you are building the indices. As @fresla says - you can crop out garbage meshing by checking the distance between vertices and meshing or not meshing. However on a quick read of the code it appears that you are cropping out vertices before building your point cloud at line 240? if (vertex.z > nearClip && vertex.z < farClip)
but this will give you a non-square grid to triangulate from ?
Hey @danb and @fresla , thank you both for the suggestions! back from vacation I adapted the code from eliot woods depth implementation and it’s still broken. I understand what the basic principle is, but I can’t figure out why vertices from all over the place are passing the conditions to create triangles in my case…
looking at the images there is a consistent recurring mis-alignment - possibly the code is mis-counting the width or height that it is triangulating - as you make left and right triangles going across it should stop one vertex before the end of the row and also one vertex before the bottom of the column… it looks like the (either) lower or left most last triangle is actually linking to the next vertex in the next column/row