{"id":3100,"date":"2016-06-17T02:35:09","date_gmt":"2016-06-17T01:35:09","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=3100"},"modified":"2016-06-17T02:35:09","modified_gmt":"2016-06-17T01:35:09","slug":"p-152-virtual-world-concept-update-123-planet-sized-terrain-part-2","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-123-planet-sized-terrain-part-2\/","title":{"rendered":"P-152: Virtual World Concept Update 123: Planet-sized Terrain: Part 2"},"content":{"rendered":"<p>The issue with rendering planet-sized terrain is, as previously discussed, the floating point precision problem. A floating origin system solves many of the precision issues associated with very large worlds, however, planets present unique problems of their own.<\/p>\n<p>The problem is that planets are both very big, and can be seen from a very long distance. \u00a0Rendering a planet that is far away is actually quite easy. The planet is rendered at the furthest distance that can be safely rendered, say, 10,000 units. Then I simply scale the planet so that is appears to be the same size as it would be if it were much further away. So, a planet that is 10,000 units from the origin and scaled down by 50% will appear to be the same size as a planet that is 20,000 units from the origin, and not scaled down at all.<\/p>\n<p>When the player is standing on the terrain, I can pretend that the terrain is essentially flat, since the curvature of the Earth will not be visible at that altitude.\u00a0 So, I could just render everything within the safe render distance of the player, and then cull anything beyond that. The player shouldn&#8217;t notice this.<\/p>\n<p>The problem I am having comes from the middle ground between being very near to the terrain and being very far.<\/p>\n<p>For example, what if the player is in the upper atmosphere? They are high enough to see the curvature of the earth, and yet close enough that I can&#8217;t scale the planet to a realistic size, since it&#8217;s radius would then be greater than the safe value for a 32-bit float.<\/p>\n<p>This is the issue that I am currently wrestling with. I am confident that there is a solution that doesn&#8217;t involve major engine changes to pull off.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The issue with rendering planet-sized terrain is, as previously discussed, the floating point precision problem. A floating origin system solves many of the precision issues associated with very large worlds, however, planets present unique problems of their own. The problem is that planets are both very big, and can be seen from a very long [&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-3100","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\/3100"}],"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=3100"}],"version-history":[{"count":2,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3100\/revisions"}],"predecessor-version":[{"id":3102,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/3100\/revisions\/3102"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=3100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=3100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=3100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}