{"id":3284,"date":"2016-07-24T03:53:25","date_gmt":"2016-07-24T02:53:25","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=3284"},"modified":"2016-07-24T03:53:25","modified_gmt":"2016-07-24T02:53:25","slug":"p-152-virtual-world-concept-update-140-planet-sized-terrain-part-19-lods-tier-2","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-140-planet-sized-terrain-part-19-lods-tier-2\/","title":{"rendered":"P-152: Virtual World Concept Update 140: Planet-sized Terrain: Part 19: LOD&#8217;s (Tier 2)"},"content":{"rendered":"<p>It has turned out to be a lot more difficult than I thought to implement the additional Levels of Detail for viewing at close range.<\/p>\n<p>I have tried various techniques, involving duplicating the existing LOD code (which is messy) and modifying it.<\/p>\n<p>The main issue that I am having is in bridging the gap between \u00a064-bit space (which deals with real world distances) and 32 bit space which deals with coordinates within the 10,000 unit limit, as defined by the floating origin system.<\/p>\n<p>I have tried implementing all LOD&#8217;s using 64-bit numbers, but with these extremely high values, it seems that the border between all LOD&#8217;s is greatly exaggerated:<\/p>\n<figure id=\"attachment_3293\" aria-describedby=\"caption-attachment-3293\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_21_17-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3293\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_21_17-AM-300x194.jpg\" alt=\"P152_DEBUG 23\/07\/2016 , 01:21:17 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_21_17-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_21_17-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_21_17-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_21_17-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3293\" class=\"wp-caption-text\">P152_DEBUG<br \/>23\/07\/2016 , 01:21:17 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_54_16-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3291\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_54_16-AM-300x194.jpg\" alt=\"P152_DEBUG 23\/07\/2016 , 12:54:16 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_54_16-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_54_16-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_54_16-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_54_16-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>P152_DEBUG<br \/>\n23\/07\/2016 , 12:54:16 AM<br \/>\nTorque 3D MIT &#8211; P152<\/p>\n<p>This obviously does not work. It does further prove that the high-level subdivision (which I am calling &#8220;Tier 1&#8221;) is working, since adding further subdivision levels results in a terrain with vast features, ie, very high peaks, very deep valleys.<\/p>\n<figure id=\"attachment_3292\" aria-describedby=\"caption-attachment-3292\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_00_44-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3292\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_00_44-AM-300x194.jpg\" alt=\"P152_DEBUG 23\/07\/2016 , 01:00:44 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_00_44-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_00_44-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_00_44-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-01_00_44-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3292\" class=\"wp-caption-text\">P152_DEBUG<br \/>23\/07\/2016 , 01:00:44 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p>Subdividing based on the 64-bit numbers should produce this, due to their high values. However, what I want to do is nodes which are within 32-bit space, and subdivide only those nodes, in 32-bit space, to produce a smooth terrain. When the player stands on, essentially the &#8220;North Pole&#8221; of the planet, these 10K nodes form a very neat shape, which makes visualising the subdivision a lot easier:<\/p>\n<figure id=\"attachment_3286\" aria-describedby=\"caption-attachment-3286\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-08_26_02-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3286\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-08_26_02-PM-300x194.jpg\" alt=\"P152_DEBUG 22\/07\/2016 , 08:26:02 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-08_26_02-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-08_26_02-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-08_26_02-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-08_26_02-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3286\" class=\"wp-caption-text\">P152_DEBUG<br \/>22\/07\/2016 , 08:26:02 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p>I believe I am making progress with this. I have had to duplicate the subdivision code, which is not efficient, but my main goal now is getting the code to work, I can optimise it later. I have implemented partial &#8220;Tier 2&#8221; subdivision, but as the below images show, there are problems with nodes not rendering:<\/p>\n<figure id=\"attachment_3287\" aria-describedby=\"caption-attachment-3287\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_13_23-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3287\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_13_23-PM-300x194.jpg\" alt=\"P152_DEBUG 22\/07\/2016 , 09:13:23 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_13_23-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_13_23-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_13_23-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_13_23-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3287\" class=\"wp-caption-text\">P152_DEBUG<br \/>22\/07\/2016 , 09:13:23 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3288\" aria-describedby=\"caption-attachment-3288\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_06_40-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3288\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_06_40-PM-300x194.jpg\" alt=\"P152_DEBUG 22\/07\/2016 , 09:06:40 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_06_40-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_06_40-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_06_40-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-22_07_2016-09_06_40-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3288\" class=\"wp-caption-text\">P152_DEBUG<br \/>22\/07\/2016 , 09:06:40 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3289\" aria-describedby=\"caption-attachment-3289\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_27_51-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3289\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_27_51-AM-300x194.jpg\" alt=\"P152_DEBUG 23\/07\/2016 , 12:27:51 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_27_51-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_27_51-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_27_51-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-23_07_2016-12_27_51-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3289\" class=\"wp-caption-text\">P152_DEBUG<br \/>23\/07\/2016 , 12:27:51 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p>I may actually be closer to a solution than these images portray, however.<\/p>\n<p>It seems clear now that I will need to add another objective to my objectives list for MS2, which is to translate the 64-bit space node positions to 32-bit. Currently, the culling and Tier 1 subdivisions are being done in 64-bit space. I am then grabbing all nodes with a 10k distance of the player, however, these nodes are being rendered with their 64-bit positions, This is causing some z-fighting issues, and will need to be fixed. I have devised an algorithm to fix this on paper, but I haven&#8217;t implemented it yet.<\/p>\n<p>I may also need to combine the 64-bit and 32-bit space positions of the player together, which would be another objective for MS2. Currently, the players position in 64-bit space is used to cull any nodes outside of 10,000 units, and the players 32-bit position is used to subdivide those nodes further to produce a smooth terrain. I may be able to handle the two position separately, I am not sure yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has turned out to be a lot more difficult than I thought to implement the additional Levels of Detail for viewing at close range. I have tried various techniques, involving duplicating the existing LOD code (which is messy) and modifying it. The main issue that I am having is in bridging the gap between [&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,17,10,11],"tags":[],"class_list":["post-3284","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","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\/3284"}],"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=3284"}],"version-history":[{"count":6,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3284\/revisions"}],"predecessor-version":[{"id":3297,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3284\/revisions\/3297"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=3284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=3284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=3284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}