{"id":1402,"date":"2015-07-12T23:56:33","date_gmt":"2015-07-12T22:56:33","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=1402"},"modified":"2015-07-13T00:08:34","modified_gmt":"2015-07-12T23:08:34","slug":"p-152-virtual-world-concept-update-37-chunked-levels-of-detail-using-quad-trees-part-6","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-37-chunked-levels-of-detail-using-quad-trees-part-6\/","title":{"rendered":"P-152: Virtual World Concept Update 37: Chunked Levels of Detail Using Quad Trees Part 6"},"content":{"rendered":"<p>I have made some progress with the quad tree.<\/p>\n<p>The main issue is still in generating the vertices for the spherical terrain in a way which is compatible with entry into the quad tree.<\/p>\n<p>I have made progress with the spherical terrain code and the quad tree code, but they are still not compatible.<\/p>\n<p>Ideally, what I need to do is generate multiple spherical terrains, each at a different detail level, and each containing a power of 4 number of vertices, 256, 1024, 4096, etc. These can then be loaded into the quad tree as they are. I can then parse the quad tree quickly, producing a list of vertices using the different detail levels (higher detail for closer vertices, lower detail for more distant vertices). These vertices would then be loaded into a vertex buffer for rendering.<\/p>\n<p>However, I cannot generate power of 4 spherical terrains, since my spherical terrain are generated from a quadrilateralised spherical cube, or quad cube, which has six sides, meaning the number of vertices needs to be evenly divisible by 6.<\/p>\n<p>My proposed solution is to use the same general technique, but instead use a power of 6 number of vertices that is as close to a power of 4 as possible, and then populate the rest of the quad tree tier with blank values. So, instead of using 4096, I would use 4092 (682*6 = 4092) and fill the 4 spaces with blank values. I would do this for all tiers. The blank spaces shouldn&#8217;t make a difference when I parse the quad tree, so it should work.<\/p>\n<p>I am still having issues with this implementation, which are mostly due to changing the resolution of the terrain at each tier, and therefore, changing the number of vertices.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have made some progress with the quad tree. The main issue is still in generating the vertices for the spherical terrain in a way which is compatible with entry into the quad tree. I have made progress with the spherical terrain code and the quad tree code, but they are still not compatible. Ideally, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,10,11],"tags":[],"class_list":["post-1402","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-software-and-games","category-spiritus-astrum","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1402"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=1402"}],"version-history":[{"count":3,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1402\/revisions"}],"predecessor-version":[{"id":1405,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1402\/revisions\/1405"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=1402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=1402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=1402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}