{"id":2597,"date":"2016-04-05T23:18:48","date_gmt":"2016-04-05T22:18:48","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=2597"},"modified":"2016-04-05T23:18:48","modified_gmt":"2016-04-05T22:18:48","slug":"p-152-virtual-world-concept-update-102-fractal-terrain-generation-part-8","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-102-fractal-terrain-generation-part-8\/","title":{"rendered":"P-152: Virtual World Concept Update 102: Fractal Terrain Generation Part 8"},"content":{"rendered":"<p>I have now implemented a Perlin Noise system into the terrain.<\/p>\n<p>I had already integrated &#8220;libnoise&#8221; into this project, and was using it to generate the noise for my previous attempt as well, but I had forgotten the input parameters to it. I assumed it required an array of points, but in actual fact it requires only a coordinate, and still produces a contiguous height field.<\/p>\n<p>This meant that I could integrate it very easily with my existing system. I had done some experiments with rand() using hash functions and seeds to produce contiguous output, but this turned out to be unnecessary.<\/p>\n<p>I have also modified the code that I was using to colour the terrain according to it&#8217;s height, so that it now works for subdivided nodes as well. The results are extremely promising.<\/p>\n<p>The terrain subdivides (I am just performing one subdivision for now) perfectly, with the child nodes forming a contiguous heightfield with correct colour values. The two images below illustrate this. The first image is at a higher resolution to the second one. The area directly under the text &#8220;PhoenixGameDev&#8221; is clearly smaller and less detailed in the first image, and has been subdivided, becoming more detailed, in the second image.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2603\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_50_53-PM-300x195.png\" alt=\"PhoenixGameDevelopment - 05_04_2016 , 09_50_53 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_50_53-PM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_50_53-PM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_50_53-PM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_50_53-PM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2602\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_02-PM-300x195.png\" alt=\"PhoenixGameDevelopment - 05_04_2016 , 09_51_02 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_02-PM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_02-PM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_02-PM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_02-PM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The only problem, which is also apparent from these images, is the visible seams on the border between the LOD&#8217;s. This is a standard\u00a0problem with this type of approach. There are various ways of dealing with it, which I will look at in the near future.<\/p>\n<p>The next goal is to implement and test subdivision through additional tiers, and hopefully I should end up with some highly detailed terrain.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2601\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_04-PM-300x195.png\" alt=\"PhoenixGameDevelopment - 05_04_2016 , 09_51_04 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_04-PM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_04-PM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_04-PM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_04-PM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2600\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_15-PM-300x195.png\" alt=\"PhoenixGameDevelopment - 05_04_2016 , 09_51_15 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_15-PM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_15-PM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_15-PM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_15-PM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2598\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_17-PM-300x195.png\" alt=\"PhoenixGameDevelopment - 05_04_2016 , 09_51_17 PM\" width=\"300\" height=\"195\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_17-PM-300x195.png 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_17-PM-768x498.png 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_17-PM-1024x664.png 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2016\/04\/PhoenixGameDevelopment-05_04_2016-09_51_17-PM.png 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have now implemented a Perlin Noise system into the terrain. I had already integrated &#8220;libnoise&#8221; into this project, and was using it to generate the noise for my previous attempt as well, but I had forgotten the input parameters to it. I assumed it required an array of points, but in actual fact it [&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,17,10,11],"tags":[],"class_list":["post-2597","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-software-and-games","category-spiritus-astrum","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\/2597"}],"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=2597"}],"version-history":[{"count":4,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2597\/revisions"}],"predecessor-version":[{"id":2606,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2597\/revisions\/2606"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=2597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=2597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=2597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}