{"id":3318,"date":"2016-07-29T02:19:27","date_gmt":"2016-07-29T01:19:27","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=3318"},"modified":"2016-07-29T02:19:27","modified_gmt":"2016-07-29T01:19:27","slug":"p-152-virtual-world-concept-update-142-planet-sized-terrain-part-21-64-bit32-bit-translation","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-142-planet-sized-terrain-part-21-64-bit32-bit-translation\/","title":{"rendered":"P-152: Virtual World Concept Update 142: Planet-sized Terrain: Part 21: 64 bit\/32 bit Translation"},"content":{"rendered":"<p>I believe I have a theoretical solution to the node translation problem.<\/p>\n<p>I have come up with an algorithm that essentially moves the origin of the world space node position (in 64-bit) to local space. Since all of the nodes that are being rendered are less than 10,000 meters away in 64-bit space, (They are within the 32-bit floating point precision limit) these nodes, after being transformed, end up with coordinates that are completely within the 10k limit.<\/p>\n<p>This means that I can render the nodes without any coordinate or scaling factor being outside of the 10k precision limit. I have so far only tested this in gnuplot, but I am confident that the algorithm works.<\/p>\n<p>The below image proves my point.<\/p>\n<figure id=\"attachment_3315\" aria-describedby=\"caption-attachment-3315\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_58_43-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3315\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_58_43-AM-300x163.jpg\" alt=\"wgnuplot 27\/07\/2016 , 12:58:43 AM Gnuplot (window id : 0)\" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_58_43-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_58_43-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_58_43-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_58_43-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3315\" class=\"wp-caption-text\">wgnuplot<br \/>27\/07\/2016 , 12:58:43 AM<br \/>Gnuplot (window id : 0)<\/figcaption><\/figure>\n<p>The green plot is the transformed nodes. There are between -50,000 and 50,000, instead of -10,000 and 10,000 because I increased the cull distance, but they are still renderable. The small purple blob in the center is actually what the same plot looks like when it is simply scaled from 64-bit space down to a renderable distance and scale. It is obviously much smaller than it should be in reality.<\/p>\n<p>The below images show the transformed plot by itself, and the same shape in the game.<\/p>\n<p>The next goal is to integrate this algorithm with the game itself, and then test it properly.<\/p>\n<figure id=\"attachment_3316\" aria-describedby=\"caption-attachment-3316\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_54_56-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3316\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_54_56-AM-300x221.jpg\" alt=\"wgnuplot 27\/07\/2016 , 12:54:56 AM Gnuplot (window id : 0)\" width=\"300\" height=\"221\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_54_56-AM-300x221.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-27_07_2016-12_54_56-AM.jpg 642w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3316\" class=\"wp-caption-text\">wgnuplot<br \/>27\/07\/2016 , 12:54:56 AM<br \/>Gnuplot (window id : 0)<\/figcaption><\/figure>\n<figure id=\"attachment_3317\" aria-describedby=\"caption-attachment-3317\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-26_07_2016-07_22_18-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3317\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-26_07_2016-07_22_18-PM-300x194.jpg\" alt=\"P152_DEBUG 26\/07\/2016 , 07:22:18 PM Torque 3D MIT - P152\" width=\"300\" height=\"194\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-26_07_2016-07_22_18-PM-300x194.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-26_07_2016-07_22_18-PM-768x498.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-26_07_2016-07_22_18-PM-1024x664.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/07\/PhoenixGameDevelopment-26_07_2016-07_22_18-PM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-3317\" class=\"wp-caption-text\">P152_DEBUG<br \/>26\/07\/2016 , 07:22:18 PM<br \/>Torque 3D MIT &#8211; P152<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I believe I have a theoretical solution to the node translation problem. I have come up with an algorithm that essentially moves the origin of the world space node position (in 64-bit) to local space. Since all of the nodes that are being rendered are less than 10,000 meters away in 64-bit space, (They are [&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-3318","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\/3318"}],"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=3318"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3318\/revisions"}],"predecessor-version":[{"id":3319,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3318\/revisions\/3319"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=3318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=3318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=3318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}