{"id":235,"date":"2010-07-14T13:20:25","date_gmt":"2010-07-14T13:20:25","guid":{"rendered":"http:\/\/grandmaster.student.utwente.nl\/?page_id=235"},"modified":"2011-12-17T23:06:29","modified_gmt":"2011-12-17T22:06:29","slug":"gpu-based-clouds","status":"publish","type":"page","link":"https:\/\/www.grandmaster.nu\/blog\/?page_id=235","title":{"rendered":"GPU-based clouds"},"content":{"rendered":"<p>Download the final report <a href=\"http:\/\/www.grandmaster.nu\/custom\/GPU-based%20clouds.pdf\">[here]<\/a><\/p>\n<p>During the Advanced Graphics course in 2008, I did a couple of experiments with computing fractals on the GPU, with the purpouse of creating realtime, animated clouds.<\/p>\n<p>Cloud-like shapes are notoriously difficult to express as triangle-based 3d models, so we looked at various alternative approaches and finally settled on generating a cloud-texture which is then applied to a skydome.<\/p>\n<p>In the early stages of our project we experimented with particle systems, where the particle would consist of an implicit function that is combined with perlin noise:<br \/>\n<center><a href=\"http:\/\/www.grandmaster.nu\/custom\/qquad.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.grandmaster.nu\/custom\/qquad-300x240.jpg\" alt=\"\" title=\"qquad\" width=\"300\" height=\"240\" class=\"alignnone size-medium wp-image-239\" \/><\/a><\/center><br \/>\nThis method proved to be quite slow, probably because of the amount of particles needed in order to get a decent cloud. <\/p>\n<p>We then applied a fBm fractal to the skydome:<br \/>\n<center><a href=\"http:\/\/www.grandmaster.nu\/custom\/noisesphere.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.grandmaster.nu\/custom\/noisesphere-300x240.jpg\" alt=\"\" title=\"noisesphere\" width=\"300\" height=\"240\" class=\"alignnone size-medium wp-image-237\" \/><\/a><\/center><br \/>\nOn the upside, we had animated clouds covering the entire sky at realtime speeds. The downside of using this method was that the clouds are relatively &#8216;flat&#8217; and didn&#8217;t look quite rough enough. Also, although the calculations were in realtime, the performance of 4D perlin noise was somewhat dissapointing. <\/p>\n<p>Because of this I looked into using a different type of noise as the basis for the fractals we used, and ended up implementing 4D simplex noise and this resulted in the following:<br \/>\n<center><a href=\"http:\/\/www.grandmaster.nu\/custom\/qskyplane.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.grandmaster.nu\/custom\/qskyplane-300x240.jpg\" alt=\"\" title=\"qskyplane\" width=\"300\" height=\"240\" class=\"alignnone size-medium wp-image-240\" \/><\/a><\/center><br \/>\nThe performance was improved, and in my opinion it looked better than before.<\/p>\n<p>Finally we attempted to adress the &#8216;flatness&#8217; of the clouds by using fractals to dynamically distort a model. It didn&#8217;t quite turn out like a cloud, but more like a mysterious bubble, sort-of similar in appearance to 3d metaballs:<br \/>\n<center><a href=\"http:\/\/www.grandmaster.nu\/custom\/qnoisesphere.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.grandmaster.nu\/custom\/qnoisesphere-300x240.jpg\" alt=\"\" title=\"qnoisesphere\" width=\"300\" height=\"240\" class=\"alignnone size-medium wp-image-238\" \/><\/a><\/center><\/p>\n<p>Read the <a href=\"http:\/\/www.grandmaster.nu\/custom\/GPU-based%20clouds.pdf\">[report]<\/a> for more detailed information, or <a href='mailto:mail@grandmaster.nu'>[contact me]<\/a> for specific requests.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Download the final report [here] During the Advanced Graphics course in 2008, I did a couple of experiments with computing fractals on the GPU, with the purpouse of creating realtime, animated clouds. Cloud-like shapes are notoriously difficult to express as triangle-based 3d models, so we looked at various alternative approaches <a class=\"more-link\" href=\"https:\/\/www.grandmaster.nu\/blog\/?page_id=235\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":231,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"_links":{"self":[{"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=\/wp\/v2\/pages\/235"}],"collection":[{"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=235"}],"version-history":[{"count":2,"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=\/wp\/v2\/pages\/235\/revisions"}],"predecessor-version":[{"id":542,"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=\/wp\/v2\/pages\/235\/revisions\/542"}],"up":[{"embeddable":true,"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=\/wp\/v2\/pages\/231"}],"wp:attachment":[{"href":"https:\/\/www.grandmaster.nu\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}