{"id":1040,"date":"2014-11-16T22:03:48","date_gmt":"2014-11-16T22:03:48","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=1040"},"modified":"2014-11-17T00:45:01","modified_gmt":"2014-11-17T00:45:01","slug":"p-152-virtual-world-concept-update-15-spherical-terrain","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-15-spherical-terrain\/","title":{"rendered":"P-152: Virtual World Concept Update 15: Spherical Terrain"},"content":{"rendered":"<p>After the issues I had with modifying T3D&#8217;s terrain, I had to come up with another solution to the problem of creating a quad cube. In the engine there is a piece of sample code called the &#8220;RenderMeshExample&#8221;. This basically outlines the code necessary to create and render a mesh using vertex and primitive buffers. I have been modifying this code in order to create a six sided cube with a specified number of vertices on each side.<\/p>\n<p>I then intend to apply the sphere mapping equations to the cube&#8217;s verts, to produce the quad cube. Using rendermeshexample as a starting point has one main advantage, in addition to allowing me to write the rendering code from scratch. It allows me to create all six sides of the cube within the same mesh, so that there should be no visible seaming effect. This avoids a very difficult problem that I would have had with my previous solution.<\/p>\n<p>However, I will have to write collision, optimisation, culling, paging, and a whole host of other features myself, since rendermeshexample doesn&#8217;t contain them. This will certainly prove difficult.<\/p>\n<p>I have managed to draw an entire face of the cube, and change the resolution, creating a grid of whatever size I want. I now need to project this face to a sphere, and of course, draw the other faces.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment162-Nov.-13-00.24.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1048\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment162-Nov.-13-00.24-300x232.jpg\" alt=\"PhoenixGameDevelopment162 Nov. 13 00.24\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment162-Nov.-13-00.24-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment162-Nov.-13-00.24-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment162-Nov.-13-00.24.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment169-Nov.-15-21.45.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1047\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment169-Nov.-15-21.45-300x232.jpg\" alt=\"PhoenixGameDevelopment169 Nov. 15 21.45\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment169-Nov.-15-21.45-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment169-Nov.-15-21.45-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment169-Nov.-15-21.45.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment171-Nov.-15-21.52.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1046\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment171-Nov.-15-21.52-300x232.jpg\" alt=\"PhoenixGameDevelopment171 Nov. 15 21.52\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment171-Nov.-15-21.52-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment171-Nov.-15-21.52-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment171-Nov.-15-21.52.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment174-Nov.-16-01.11.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1045\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment174-Nov.-16-01.11-300x232.jpg\" alt=\"PhoenixGameDevelopment174 Nov. 16 01.11\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment174-Nov.-16-01.11-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment174-Nov.-16-01.11-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment174-Nov.-16-01.11.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1044\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49-300x232.jpg\" alt=\"PhoenixGameDevelopment177 Nov. 16 01.49\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment188-Nov.-16-15.15.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1042\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment188-Nov.-16-15.15-300x232.jpg\" alt=\"PhoenixGameDevelopment188 Nov. 16 15.15\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment188-Nov.-16-15.15-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment188-Nov.-16-15.15-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment188-Nov.-16-15.15.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment182-Nov.-16-02.00.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1043\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment182-Nov.-16-02.00-300x232.jpg\" alt=\"PhoenixGameDevelopment182 Nov. 16 02.00\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment182-Nov.-16-02.00-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment182-Nov.-16-02.00-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment182-Nov.-16-02.00.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1044\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49-300x232.jpg\" alt=\"PhoenixGameDevelopment177 Nov. 16 01.49\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/11\/PhoenixGameDevelopment177-Nov.-16-01.49.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the issues I had with modifying T3D&#8217;s terrain, I had to come up with another solution to the problem of creating a quad cube. In the engine there is a piece of sample code called the &#8220;RenderMeshExample&#8221;. This basically outlines the code necessary to create and render a mesh using vertex and primitive buffers. [&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-1040","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\/1040"}],"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=1040"}],"version-history":[{"count":3,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1040\/revisions"}],"predecessor-version":[{"id":1063,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1040\/revisions\/1063"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=1040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=1040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=1040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}