{"id":1118,"date":"2014-12-03T18:16:34","date_gmt":"2014-12-03T18:16:34","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=1118"},"modified":"2014-12-03T18:17:22","modified_gmt":"2014-12-03T18:17:22","slug":"p-152-virtual-world-concept-update-20-spherical-terrain-3d-perlin-noise","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-20-spherical-terrain-3d-perlin-noise\/","title":{"rendered":"P-152: Virtual World Concept Update 20: Spherical Terrain: 3D Perlin Noise"},"content":{"rendered":"<p>I believe I have fixed the seaming problem and generated a sphere displaced with seamless noise.<\/p>\n<p>I was looking at this problem the wrong way. I was looking at the sphere as a combination of six flat planes, and trying to apply 2D noise to each plane, similiar to the way a standard terrain would be created. This created seams between the six sides of the quad sphere.<\/p>\n<p>However, even though the sphere is create from a projected cube, this is not the correct way to apply noise to it. I should have looked at it as a regular sphere, and used a 3D noise function to take in the x,y, and z coordinates of the sphere as inputs. This is what I have now done.<\/p>\n<p>I am using<a href=\"http:\/\/libnoise.sourceforge.net\/\"> libnoise<\/a>, and opensource noise library. After generating the noise value using the coordinates of the sphere as inputs, I am then displacing each point on the sphere along it&#8217;s normal. This is the critical step that I was missing for a while. In order for the sphere points to displace in the correct direction, the normal needs to be taken into account.<\/p>\n<p>The sphere looks more like an asteroid now, rather than a planet, but fixing that can be done by configuring the noise function.<\/p>\n<p>The next step is to work on procedural texturing of the sphere. I intend to use the height value of the individual points to paint different textures, mountains would be while, low areas blue, areas in the middle green, etc etc.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment02-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1127\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment02-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment02 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment02-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment02-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment02-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment03-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1126\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment03-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment03 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment03-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment03-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment03-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment04-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1125\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment04-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment04 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment04-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment04-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment04-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment05-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1124\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment05-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment05 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment05-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment05-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment05-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment07-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1122\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment07-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment07 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment07-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment07-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment07-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment11-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1117\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment11-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment11 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment11-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment11-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment11-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment10-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1119\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment10-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment10 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment10-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment10-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment10-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment09-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1120\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment09-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment09 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment09-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment09-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment09-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment08-Dec.-03-17.41.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1121\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment08-Dec.-03-17.41-300x232.jpg\" alt=\"PhoenixGameDevelopment08 Dec. 03 17.41\" width=\"300\" height=\"232\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment08-Dec.-03-17.41-300x232.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment08-Dec.-03-17.41-1024x793.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2014\/12\/PhoenixGameDevelopment08-Dec.-03-17.41.jpg 1040w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I believe I have fixed the seaming problem and generated a sphere displaced with seamless noise. I was looking at this problem the wrong way. I was looking at the sphere as a combination of six flat planes, and trying to apply 2D noise to each plane, similiar to the way a standard terrain would [&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-1118","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\/1118"}],"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=1118"}],"version-history":[{"count":2,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1118\/revisions"}],"predecessor-version":[{"id":1129,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1118\/revisions\/1129"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=1118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=1118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=1118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}