Because the quad-tree structure is used, cracks may occur between different levels of blocks (Cracks).
As shown inA,BCracks may occur because the two parts do not share the vertex. At present, there are many methods to solve the crack, mainly divided into the hop point method and the addition method. The hop point method skips some points on the boundary of high-resolution chunks and does not draw them. This ensures the continuity of adjacent chunks. The addition method adds some vertices on the boundary of the chunks at a lower resolution to maintain the continuity of the two chunks. No matter whether it is adding or removing vertices, the whole terrain needs to be traversed and related parts need to be re-divided into triangles, and the independence of parts is lost.CacheThis increases the difficulty, complexity, and efficiency.
we adopt a more efficient method to eliminate cracks. Extend a circle of the Four Edges of each block based on the existing vertex. They share the vertex with the boundary of a single block, but the height value is different, this extended circle is called "skirt" ( skirts ). After projection, as long as the height value of the vertex is large enough, two blocks of skirts can block the crack. Of course, this method of eliminating cracks will increase the number of triangles to be drawn. However, tests show that for the current graphics processor, the extra increase in the number of triangles will not result in a reduction in performance.
rendering program:
discuss about the http://www.gamedev.net/community/forums/topic.asp of terrain levels and skirt? Topic_id = 376154