{"id":1005,"date":"2014-11-04T16:58:57","date_gmt":"2014-11-04T16:58:57","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=1005"},"modified":"2014-11-16T21:51:51","modified_gmt":"2014-11-16T21:51:51","slug":"p-152-virtual-world-concept-update-12-quadrilateralized-spherical-cubes","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-12-quadrilateralized-spherical-cubes\/","title":{"rendered":"P-152: Virtual World Concept Update 12: Quadrilateralized spherical cubes"},"content":{"rendered":"<p>The approach I need to take to creating spherical terrain involves the creation of a &#8220;Quadrilateralized spherical cubes&#8221;. Essentially, a cube which is projected to a sphere.<\/p>\n<p>I have been trying to create a sphere using the wrong equations. I have been getting very close to the solution, as can be seen in the first image, but this approach will not solve the problem. I can only have one value along the z-axis with the type of terrain I am using, and so creating a sphere or part of a sphere with conventional sphere equatiosn will produce distortions or invalid vertex point information whenever the sphere section curves back on itself.<\/p>\n<p>I will need to use different equations to produce the Quad cube, however, this wil require being able to modify the X and Y axes of the terrain file in addition to the Z axis (height). The second two images show the results of modifying the Z-axis height only. This is very close to being correct, but I can never assemble these sections into a sphere without also modifying the other axes. T3D&#8217;s Terrain does not allow this, and so I have quite a lot of work to do to modify the terrain code.<\/p>\n<p>UPDATE:<br \/>\nI found <a href=\"http:\/\/mathproofs.blogspot.com.au\/2005\/07\/mapping-cube-to-sphere.html\">THIS<\/a> website, which contains the equations necessary to create the quad cube. This is a vital resource.<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment111-Nov.-01-12.57.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1004\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment111-Nov.-01-12.57-300x232.jpg\" alt=\"PhoenixGameDevelopment111 Nov. 01 12.57\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment111-Nov.-01-12.57-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment111-Nov.-01-12.57-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment111-Nov.-01-12.57.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment124-Nov.-02-16.56.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1003\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment124-Nov.-02-16.56-300x232.jpg\" alt=\"PhoenixGameDevelopment124 Nov. 02 16.56\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment124-Nov.-02-16.56-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment124-Nov.-02-16.56-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment124-Nov.-02-16.56.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment122-Nov.-02-16.54.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1007\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment122-Nov.-02-16.54-300x232.jpg\" alt=\"PhoenixGameDevelopment122 Nov. 02 16.54\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment122-Nov.-02-16.54-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment122-Nov.-02-16.54-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment122-Nov.-02-16.54.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The approach I need to take to creating spherical terrain involves the creation of a &#8220;Quadrilateralized spherical cubes&#8221;. Essentially, a cube which is projected to a sphere. I have been trying to create a sphere using the wrong equations. I have been getting very close to the solution, as can be seen in the first [&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,10],"tags":[],"class_list":["post-1005","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-software-and-games","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\/1005"}],"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=1005"}],"version-history":[{"count":5,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1005\/revisions"}],"predecessor-version":[{"id":1039,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1005\/revisions\/1039"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=1005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=1005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=1005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}