{"id":1066,"date":"2014-11-19T15:43:12","date_gmt":"2014-11-19T15:43:12","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=1066"},"modified":"2014-11-19T15:48:58","modified_gmt":"2014-11-19T15:48:58","slug":"p-152-virtual-world-concept-update-17-spherical-terrain","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-17-spherical-terrain\/","title":{"rendered":"P-152: Virtual World Concept Update 17: Spherical Terrain"},"content":{"rendered":"<p>I have completed the Quad Sphere! It took some time to draw the other five planes of the sphere in the correct location and the correct orientation, but that is now working.<\/p>\n<p>The system is scalable, I can enter a resolution and it will draw a quad sphere with that resolution, so for example a resolution of 3 will produce a very blocky sphere, such as this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1067\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment242-Nov.-18-21.15-300x232.jpg\" alt=\"PhoenixGameDevelopment242 Nov. 18 21.15\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment242-Nov.-18-21.15-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment242-Nov.-18-21.15-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment242-Nov.-18-21.15.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>while a resolution of 10 will produce a much higher resolution sphere, like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1073\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment250-Nov.-19-14.27-300x232.jpg\" alt=\"PhoenixGameDevelopment250 Nov. 19 14.27\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment250-Nov.-19-14.27-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment250-Nov.-19-14.27-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment250-Nov.-19-14.27.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The resolution gives the number of vertices per plane, so a resolution of 3 works out to: 3*3 = 9 vertices per plane. In this grid, there are (3-1)(3-1) squares, which is 4 squares, each square contains two triangles, which is 8. There are 6 sides to the quad sphere, which means a final poly count of 8X6, which is 48. Clearly, the complexity scales dramatically with resolution, and this is why, for generating even reasonably large or\u00a0complex terrains, optimisation and culling \u00a0will be extremely important.<\/p>\n<p>The algorithm seems to be working well, although I am noticing some distortion of some kind visible around the seams. I am hoping that this is a cosmetic issue that can be fixed when I implement texturing, but it may be more serious. The next step is to apply a noise function to the vertices to produce an actual bona fide &#8220;terrain&#8221;. What I have now is really just a sphere. Once I do this, I will know how serious the seaming issue is.<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/5dwLn00wxdY\" width=\"420\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/ZIU1aOKOg1k\" width=\"420\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/CPS-VhVy5xw\" width=\"420\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><br \/>\n&nbsp;<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment247-Nov.-19-14.27.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1076\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment247-Nov.-19-14.27-300x232.jpg\" alt=\"PhoenixGameDevelopment247 Nov. 19 14.27\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment247-Nov.-19-14.27-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment247-Nov.-19-14.27-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment247-Nov.-19-14.27.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment248-Nov.-19-14.27.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1075\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment248-Nov.-19-14.27-300x232.jpg\" alt=\"PhoenixGameDevelopment248 Nov. 19 14.27\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment248-Nov.-19-14.27-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment248-Nov.-19-14.27-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment248-Nov.-19-14.27.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment249-Nov.-19-14.27.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1074\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment249-Nov.-19-14.27-300x232.jpg\" alt=\"PhoenixGameDevelopment249 Nov. 19 14.27\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment249-Nov.-19-14.27-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment249-Nov.-19-14.27-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment249-Nov.-19-14.27.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\u00a0\u00a0<a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment243-Nov.-18-21.39.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1072\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment243-Nov.-18-21.39-300x232.jpg\" alt=\"PhoenixGameDevelopment243 Nov. 18 21.39\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment243-Nov.-18-21.39-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment243-Nov.-18-21.39-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment243-Nov.-18-21.39.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment227-Nov.-18-15.42.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1071\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment227-Nov.-18-15.42-300x232.jpg\" alt=\"PhoenixGameDevelopment227 Nov. 18 15.42\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment227-Nov.-18-15.42-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment227-Nov.-18-15.42-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment227-Nov.-18-15.42.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment230-Nov.-18-15.44.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1070\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment230-Nov.-18-15.44-300x232.jpg\" alt=\"PhoenixGameDevelopment230 Nov. 18 15.44\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment230-Nov.-18-15.44-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment230-Nov.-18-15.44-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment230-Nov.-18-15.44.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment231-Nov.-18-16.12.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1069\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment231-Nov.-18-16.12-300x232.jpg\" alt=\"PhoenixGameDevelopment231 Nov. 18 16.12\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment231-Nov.-18-16.12-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment231-Nov.-18-16.12-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment231-Nov.-18-16.12.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment239-Nov.-18-16.47.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1068\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment239-Nov.-18-16.47-300x232.jpg\" alt=\"PhoenixGameDevelopment239 Nov. 18 16.47\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment239-Nov.-18-16.47-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment239-Nov.-18-16.47-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment239-Nov.-18-16.47.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have completed the Quad Sphere! It took some time to draw the other five planes of the sphere in the correct location and the correct orientation, but that is now working. The system is scalable, I can enter a resolution and it will draw a quad sphere with that resolution, so for example a [&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-1066","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\/1066"}],"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=1066"}],"version-history":[{"count":4,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1066\/revisions"}],"predecessor-version":[{"id":1080,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1066\/revisions\/1080"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=1066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=1066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=1066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}