{"id":971,"date":"2014-10-31T16:00:15","date_gmt":"2014-10-31T16:00:15","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=971"},"modified":"2014-10-31T16:00:15","modified_gmt":"2014-10-31T16:00:15","slug":"p-152-virtual-world-concept-update-11-spherical-terrain","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-11-spherical-terrain\/","title":{"rendered":"P-152: Virtual World Concept Update 11: Spherical Terrain"},"content":{"rendered":"<p>I have made quite a good start with the spherical terrain. I have managed to create a cube using six terrain objects, and have learned how to deform those terrains using curves, and apply noise to those curves to generate terrain.<\/p>\n<p>I now need to create an actual sphere. I have succeeded in creating a curved terrain object, but it is not spherical, and has visible seams at the edges. This will likely be the greatest challenge of the project, at least before I start working on terrain paging and very large terrains.<\/p>\n<p>T3D&#8217;s terrain system, which I am basing my spherical terrain on, is very simple and easy to use. It is basicaly a list of vertices, and so terrain can be deformed very easily using the following code:<\/p>\n<blockquote>\n<p style=\"text-align: left;\">\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 for ( S32 y = 0; y &lt; blockSize; y++ )<br \/>\n{<\/p>\n<p>for ( S32 x = 0; x &lt; blockSize; x++ )<br \/>\n{<\/p>\n<p style=\"text-align: left;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 file-&gt;setHeight( x, y,999 );<\/p>\n<p style=\"text-align: left;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n}<\/p>\n<p style=\"text-align: left;\">\n<p style=\"text-align: left;\">Where &#8220;file&#8221; is a terrain file, and &#8220;999&#8221; is the desired height of that terrain pixel. Blocksize is the resolution of the terrain, so 256, 1024, etc.<\/p>\n<p style=\"text-align: left;\">\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment56-Oct.-29-14.32.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-985\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment56-Oct.-29-14.32-300x232.jpg\" alt=\"PhoenixGameDevelopment56 Oct. 29 14.32\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment56-Oct.-29-14.32-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment56-Oct.-29-14.32-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment56-Oct.-29-14.32.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment68-Oct.-29-15.10.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-984\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment68-Oct.-29-15.10-300x232.jpg\" alt=\"PhoenixGameDevelopment68 Oct. 29 15.10\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment68-Oct.-29-15.10-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment68-Oct.-29-15.10-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment68-Oct.-29-15.10.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment76-Oct.-29-17.57.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-983\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment76-Oct.-29-17.57-300x232.jpg\" alt=\"PhoenixGameDevelopment76 Oct. 29 17.57\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment76-Oct.-29-17.57-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment76-Oct.-29-17.57-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment76-Oct.-29-17.57.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment79-Oct.-30-14.40.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-982\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment79-Oct.-30-14.40-300x232.jpg\" alt=\"PhoenixGameDevelopment79 Oct. 30 14.40\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment79-Oct.-30-14.40-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment79-Oct.-30-14.40-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment79-Oct.-30-14.40.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment85-Oct.-30-14.49.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-981\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment85-Oct.-30-14.49-300x232.jpg\" alt=\"PhoenixGameDevelopment85 Oct. 30 14.49\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment85-Oct.-30-14.49-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment85-Oct.-30-14.49-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment85-Oct.-30-14.49.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment89-Oct.-30-14.51.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-980\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment89-Oct.-30-14.51-300x232.jpg\" alt=\"PhoenixGameDevelopment89 Oct. 30 14.51\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment89-Oct.-30-14.51-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment89-Oct.-30-14.51-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment89-Oct.-30-14.51.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment08-Oct.-27-23.50.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-979\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment08-Oct.-27-23.50-300x232.jpg\" alt=\"PhoenixGameDevelopment08 Oct. 27 23.50\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment08-Oct.-27-23.50-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment08-Oct.-27-23.50-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment08-Oct.-27-23.50.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment21-Oct.-28-16.47.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-978\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment21-Oct.-28-16.47-300x232.jpg\" alt=\"PhoenixGameDevelopment21 Oct. 28 16.47\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment21-Oct.-28-16.47-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment21-Oct.-28-16.47-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment21-Oct.-28-16.47.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment24-Oct.-28-16.49.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-977\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment24-Oct.-28-16.49-300x232.jpg\" alt=\"PhoenixGameDevelopment24 Oct. 28 16.49\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment24-Oct.-28-16.49-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment24-Oct.-28-16.49-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment24-Oct.-28-16.49.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment26-Oct.-28-16.50.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-976\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment26-Oct.-28-16.50-300x232.jpg\" alt=\"PhoenixGameDevelopment26 Oct. 28 16.50\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment26-Oct.-28-16.50-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment26-Oct.-28-16.50-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment26-Oct.-28-16.50.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment29-Oct.-28-16.52.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-975\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment29-Oct.-28-16.52-300x232.jpg\" alt=\"PhoenixGameDevelopment29 Oct. 28 16.52\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment29-Oct.-28-16.52-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment29-Oct.-28-16.52-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment29-Oct.-28-16.52.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment37-Oct.-28-18.08.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-974\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment37-Oct.-28-18.08-300x232.jpg\" alt=\"PhoenixGameDevelopment37 Oct. 28 18.08\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment37-Oct.-28-18.08-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment37-Oct.-28-18.08-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment37-Oct.-28-18.08.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment39-Oct.-28-18.31.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-973\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment39-Oct.-28-18.31-300x232.jpg\" alt=\"PhoenixGameDevelopment39 Oct. 28 18.31\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment39-Oct.-28-18.31-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment39-Oct.-28-18.31-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment39-Oct.-28-18.31.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment42-Oct.-28-18.31.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-972\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment42-Oct.-28-18.31-300x232.jpg\" alt=\"PhoenixGameDevelopment42 Oct. 28 18.31\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment42-Oct.-28-18.31-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment42-Oct.-28-18.31-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/10\/PhoenixGameDevelopment42-Oct.-28-18.31.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have made quite a good start with the spherical terrain. I have managed to create a cube using six terrain objects, and have learned how to deform those terrains using curves, and apply noise to those curves to generate terrain. I now need to create an actual sphere. I have succeeded in creating 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-971","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\/971"}],"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=971"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/971\/revisions"}],"predecessor-version":[{"id":986,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/971\/revisions\/986"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}