# tesselation problem

This topic is 5416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all, I'm done rendering a sphere. The idear is to heightmap it. I start off with a octahedron (if thats what 2 piramids, one upsidedown is called). Then I added some noise to the vertexes. I tesselate the edges to make 4 triangles out of every existing one and add some more noise to the newly created vertexes. This goes on a couple of times untill im satisfied with the amount of detail. The problem is that there are holes in my sphere. It lies in the tesselation, cause for every triangle the edges are split. So every edge is split twice. How do i avoid this? I can look up the edge if it was allready split, but it would take years to do that. I could also not for every triangle split the edges, bus for every edge. Then I would have a problem creating the right triangles and have them all front facing. Are there any good tutorials about this tesselation problem or can anyone give a solution? Thanx! Marty

##### Share on other sites
Maybe instead, put a new vertex in the middle of a triangle face. Then you'll have 3 triangles instead of one.

##### Share on other sites
Just split all your edges first. If you jumped all over processing the edges as you would going through the faces then who knows where the other half went. If you process them in order from start to end you know exactly where the other half is. If you had n edges when you started then you have 2n when you are done. If the original edge was m then one half is m and the other half is m+n. Once you do that then process the faces to create the other half of the new edges plus the new faces.

##### Share on other sites
I have come across the same problem as you. Basically the thing you said would take years to do worked fine for me. I don't think there is a much better solution. I ended up doing this in realtime with quite acceptable results, but ideally you should only do it once on initialisation.

petewood: putting a new vertex in the centre of the triangle is not the correct way to do it, and will not give a properly tesselated square when you tesselate the second time, I believe.

It's far better and more correct to split along each edge. I suggest doing that, and also don't start with an octahedron, start with a dodecahedron as it comes out better IMHO. All triangles are then equilateral I think. I mean if you're doing it at initialisation time you may as well generate the best looking sphere.

The front facing part is easy, use the outwards pointing normals. Actually my code generated the correct winding also if I remember correctly.

I can give more details if you like, feel free to PM me.

• 18
• 29
• 11
• 21
• 16