{"id":3239,"date":"2016-07-17T23:58:36","date_gmt":"2016-07-17T22:58:36","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=3239"},"modified":"2016-07-18T00:04:08","modified_gmt":"2016-07-17T23:04:08","slug":"p-152-virtual-world-concept-update-135-planet-sized-terrain-part-14","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-135-planet-sized-terrain-part-14\/","title":{"rendered":"P-152: Virtual World Concept Update 135: Planet-sized Terrain: Part 14"},"content":{"rendered":"<p>I have made significant progress recently with regards to rendering realistic terrain. I have implemented the changes that I wrote about in my previous post, and this seems to be working. Essentially, I am taking the local space coordinates of the terrain (between -1 and +1) and scaling them to the true world-space coordinates of the planet\u00a0(using 64-bit numbers). I am then performing the LOD subdivision on these 64-bit numbers, gradually iterating through the levels, and each time, I am discarding nodes that are outside a given range of the player.<br \/>\nThe images below show this process at work:<\/p>\n<figure id=\"attachment_3247\" aria-describedby=\"caption-attachment-3247\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-05_29_35-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3247\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-05_29_35-PM-300x194.jpg\" alt=\"P152_DEBUG 15\/07\/2016 , 05:29:35 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-05_29_35-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-05_29_35-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-05_29_35-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-05_29_35-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3247\" class=\"wp-caption-text\">P152_DEBUG<br \/>15\/07\/2016 , 05:29:35 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_13_05-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3244\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_13_05-PM-300x194.jpg\" alt=\"P152_DEBUG 15\/07\/2016 , 06:13:05 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_13_05-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_13_05-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_13_05-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_13_05-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>P152_DEBUG<br \/>\n15\/07\/2016 , 06:13:05 PM<br \/>\nTorque 3D MIT &#8211; P152<\/p>\n<figure id=\"attachment_3246\" aria-describedby=\"caption-attachment-3246\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_08_44-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3246\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_08_44-PM-300x194.jpg\" alt=\"P152_DEBUG 15\/07\/2016 , 06:08:44 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_08_44-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_08_44-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_08_44-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_08_44-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3246\" class=\"wp-caption-text\">P152_DEBUG<br \/>15\/07\/2016 , 06:08:44 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3243\" aria-describedby=\"caption-attachment-3243\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_38_58-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3243\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_38_58-PM-300x194.jpg\" alt=\"P152_DEBUG 15\/07\/2016 , 06:38:58 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_38_58-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_38_58-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_38_58-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_38_58-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3243\" class=\"wp-caption-text\">P152_DEBUG<br \/>15\/07\/2016 , 06:38:58 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3242\" aria-describedby=\"caption-attachment-3242\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_42_59-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3242\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_42_59-PM-300x194.jpg\" alt=\"P152_DEBUG 15\/07\/2016 , 06:42:59 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_42_59-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_42_59-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_42_59-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-15_07_2016-06_42_59-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3242\" class=\"wp-caption-text\">P152_DEBUG<br \/>15\/07\/2016 , 06:42:59 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p>Finally, I end up with exactly what I want, which is a small number of nodes that are less than 10,000 units from the player. This has worked very well. I still need to change the &#8220;scale&#8221; parameter in the editor to the true scale (a 64-bit number) but this doesn&#8217;t seem to cause any issues. When I scale up in the editor, the rendered nodes seem to be exactly right:<\/p>\n<figure id=\"attachment_3240\" aria-describedby=\"caption-attachment-3240\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-01_20_57-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3240\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-01_20_57-AM-300x194.jpg\" alt=\"P152_DEBUG 16\/07\/2016 , 01:20:57 AM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-01_20_57-AM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-01_20_57-AM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-01_20_57-AM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-01_20_57-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3240\" class=\"wp-caption-text\">P152_DEBUG<br \/>16\/07\/2016 , 01:20:57 AM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<figure id=\"attachment_3238\" aria-describedby=\"caption-attachment-3238\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-07_14_07-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3238\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-07_14_07-PM-300x194.jpg\" alt=\"P152_DEBUG 16\/07\/2016 , 07:14:07 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-07_14_07-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-07_14_07-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-07_14_07-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-16_07_2016-07_14_07-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3238\" class=\"wp-caption-text\">P152_DEBUG<br \/>16\/07\/2016 , 07:14:07 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n<p>I haven&#8217;t verified the distance exactly, but they look to be approximately correct.<\/p>\n<p>I still have a lot of work to do with verifying and improving this code, but I think I definitely have proof of concept.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have made significant progress recently with regards to rendering realistic terrain. I have implemented the changes that I wrote about in my previous post, and this seems to be working. Essentially, I am taking the local space coordinates of the terrain (between -1 and +1) and scaling them to the true world-space coordinates of [&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-3239","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\/3239"}],"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=3239"}],"version-history":[{"count":4,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3239\/revisions"}],"predecessor-version":[{"id":3253,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3239\/revisions\/3253"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=3239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=3239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=3239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}