{"id":5021,"date":"2010-05-31T15:38:08","date_gmt":"2010-05-31T20:38:08","guid":{"rendered":"https:\/\/spaceengine.org\/?p=5021"},"modified":"2022-08-29T04:13:17","modified_gmt":"2022-08-29T09:13:17","slug":"first-procedural-terrain","status":"publish","type":"post","link":"https:\/\/spaceengine.org\/news\/blog100531\/","title":{"rendered":"First procedural terrain"},"content":{"rendered":"<p>This is the first attempt to make a procedural terrain. The same quadtree-based terrain engine is used as before. But instead of loading pieces of pre-processed planet texture from the disk, the engine generates textures programmatically (on CPU). The first step is calculating a multi-octave Perlin noise and saving it to an elevation map texture. This texture is then used to generate a 3D mesh of a quadtree node, and then converted to a normal map for terrain lighting. The second stage is generating a color texture by simply assinging a color to each pixel based on elevation. This is the very basic algorithm; it might be improved to produce more realistic terrain. But the main goal is to move it to GPU: shaders will be about 100 times faster than CPU in this task.<\/p>\n<p><a href=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/scr00009.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/scr00009-1024x552.jpg\" alt=\"\" width=\"1024\" height=\"552\" class=\"aligncenter size-large wp-image-5023\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/scr00009-1024x552.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/scr00009-300x162.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/scr00009-768x414.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/scr00009-700x378.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2022\/08\/scr00009.jpg 1272w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the first attempt to make a procedural terrain. The same quadtree-based terrain engine is used as before. But instead of loading pieces of pre-processed planet texture from the disk, the engine generates textures programmatically (on CPU). The first step is calculating a multi-octave...<\/p>\n","protected":false},"author":1,"featured_media":5022,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5021","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/5021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/comments?post=5021"}],"version-history":[{"count":4,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/5021\/revisions"}],"predecessor-version":[{"id":5230,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/5021\/revisions\/5230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/media\/5022"}],"wp:attachment":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/media?parent=5021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/categories?post=5021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/tags?post=5021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}