{"id":3233,"date":"2016-07-14T20:05:52","date_gmt":"2016-07-14T19:05:52","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=3233"},"modified":"2016-07-14T20:05:52","modified_gmt":"2016-07-14T19:05:52","slug":"p-152-virtual-world-concept-update-134-planet-sized-terrain-part-13","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-134-planet-sized-terrain-part-13\/","title":{"rendered":"P-152: Virtual World Concept Update 134: Planet-sized Terrain: Part 13"},"content":{"rendered":"<p>I have made significant progress with the terrain&#8217;s floating origin system.<\/p>\n<p>I have added and tested all of the distance calculations, and I can now move the player in world space and have that world space position influence the rendering of the terrain nodes. This means that the terrain &#8220;pages&#8221; as the player moves in world space, as expected.<\/p>\n<figure id=\"attachment_3231\" aria-describedby=\"caption-attachment-3231\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-01_32_30-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3231\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-01_32_30-AM-300x194.jpg\" alt=\"P152_DEBUG 14\/07\/2016 , 01:32:30 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-01_32_30-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-01_32_30-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-01_32_30-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-01_32_30-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3231\" class=\"wp-caption-text\">P152_DEBUG<br \/>14\/07\/2016 , 01:32:30 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3230\" aria-describedby=\"caption-attachment-3230\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_41_18-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3230\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_41_18-AM-300x194.jpg\" alt=\"P152_DEBUG 14\/07\/2016 , 05:41:18 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_41_18-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_41_18-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_41_18-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_41_18-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3230\" class=\"wp-caption-text\">P152_DEBUG<br \/>14\/07\/2016 , 05:41:18 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3229\" aria-describedby=\"caption-attachment-3229\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_18-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3229\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_18-AM-300x194.jpg\" alt=\"P152_DEBUG 14\/07\/2016 , 05:42:18 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_18-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_18-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_18-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_18-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3229\" class=\"wp-caption-text\">P152_DEBUG<br \/>14\/07\/2016 , 05:42:18 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_29-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3232\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_29-AM-300x194.jpg\" alt=\"P152_DEBUG 14\/07\/2016 , 05:42:29 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_29-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_29-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_29-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-14_07_2016-05_42_29-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>P152_DEBUG<br \/>\n14\/07\/2016 , 05:42:29 AM<br \/>\nTorque 3D MIT &#8211; P152<br \/>\nHowever, I have discovered a problem with my concept.<\/p>\n<p>Currently, the process is:<br \/>\nThe coordinates for the terrain nodes are in local space, so I scale these to world space (64-bit numbers).<\/p>\n<p>I then get the distance from the center of each terrain node to the player, and cull everything further than a specified distance.<\/p>\n<p>I then take the nodes that haven&#8217;t been culled, rescale them to 32-bit space, and apply the LOD subdivision to them.<\/p>\n<p>The problem here is that when I scale to 32-bit space I am basically scaling the entire world to a radius of 10,000 units. Even though I have a floating origin system, I am essentially not using it.<br \/>\nAs the player moves around the world in 64-bit space, the terrain in 32-bit space will update correctly, but that 32-bit terrain will have a radius of 10,000 units, which will not work.<\/p>\n<p>What I need to do, is to cull all nodes not close to the player, as I am currently doing, but then, instead of scaling them to 10k and then subdividing them using LODs, I would subdivide the 64-bit nodes without scaling. The initial terrain mesh is low resolution, so each node is far bigger than 10k. If I continuously subdivide each node,\u00a0and then continue to cull any nodes outside of the 10k boundary around the player, I should eventually end up with a finely detailed mesh containing only nodes within 10k of the player, which is exactly what I want.<\/p>\n<p>These changes will hopefully not be too difficult to implement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have made significant progress with the terrain&#8217;s floating origin system. I have added and tested all of the distance calculations, and I can now move the player in world space and have that world space position influence the rendering of the terrain nodes. This means that the terrain &#8220;pages&#8221; as the player moves in [&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-3233","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\/3233"}],"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=3233"}],"version-history":[{"count":3,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3233\/revisions"}],"predecessor-version":[{"id":3237,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3233\/revisions\/3237"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=3233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=3233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=3233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}