{"id":331,"date":"2016-08-11T00:41:16","date_gmt":"2016-08-10T22:41:16","guid":{"rendered":"http:\/\/www.richardandersson.net\/?p=331"},"modified":"2017-04-24T22:46:25","modified_gmt":"2017-04-24T20:46:25","slug":"computer-rendering-of-the-earth-and-moon","status":"publish","type":"post","link":"https:\/\/richardandersson.net\/?p=331","title":{"rendered":"Computer rendering of the Earth and Moon"},"content":{"rendered":"<p>Modelling and rendering of computer generated imagery (CGI) have been a hobby of mine for some time. In my work as a scientist I have used this skill to model and animate\u00a0devices, however I have also animated and rendered scenes just for fun and to learn new techniques. From\u00a0my interest for astronomy and space-technology I came up with the idea of simulating and rendering a highly detailed version of the Earth in 3D based on satellite data. I tried to make the Earth as realistic as possible\u00a0but while still limiting myself from using computationally heavy techniques such as volumetric clouds and atmosphere and sticking only to image mapping and custom shaders.<\/p>\n<p>The final rendered animation\u00a0can be seen here in 4K:<\/p>\n<p><iframe loading=\"lazy\" title=\"Earth - Day to Night\" width=\"848\" height=\"477\" src=\"https:\/\/www.youtube.com\/embed\/-S1WZNtcqnc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>The 3D model consisted of three spheres:<\/p>\n<ol>\n<li>The surface of the Earth consisting of two different textures for the light side and the dark side of the earth. A bump map was used to give the illusion of shadows from high mountains and a spectacular map was used for the oceans in order to simulate the reflection of the sun in the water.<\/li>\n<li>A white\u00a0sphere with a radius ca 10 km larger than the previous sphere and with a transparency map for the clouds. This gives the illusion that the clouds are above the earth and they also cast a shadow into earth below them.<\/li>\n<li>An even larger sphere with a radius ca 50 km larger than the sphere of the surface with a custom shader that turns light blue at large incident angles and in direct sunlight, giving the illusion of a blue glow from the outermost atmosphere.<\/li>\n<\/ol>\n<p>The textures I used for the Earth was provided by NASA from two different satellites. The satellite Terra with its moderate-resolution imaging spectroradiometer (MODIS) is responsible for the daylight imagery of the land and the clouds. The\u00a0Suomi National Polar-orbiting Partnership (Suomi NPP) satellite with its Visible Infrared Imaging Radiometer Suite (VIIRS) is responsible for the night-time imagery which shows the city lights from space. The bump maps\u00a0is derived from data from the\u00a0USGS DEM database and the specular map is based of the blue water areas in the\u00a0diffuse daylight surface map.<\/p>\n<p>Most of these textures had to be edited and color corrected in order to fit the look of the\u00a0final render. For example, the cloud map had visible seams that needed to be cloned and repaired, the night lights texture had too much ambient lighting in the areas without cities and the surface map in daylight was completely missing the Arctic, since it was not considered as &#8220;land&#8221; but as a piece of ice and the oceans were lacking detail so it was merged with a faint bathymetry map.<\/p>\n<p>The textures used were 43200 x 21600 pixels large but this was most likely more than necessary, so in order to reduce the file size I only uploaded the textures in\u00a021600 x 10800 pixel here below.\u00a0If you would be interested in the higher resolution versions then\u00a0contact me directly .<\/p>\n<div id='gallery-1' class='gallery galleryid-331 gallery-columns-2 gallery-size-large'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Diffuse.July_21600x43200.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"424\" src=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Diffuse.July_21600x43200-1024x512.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Diffuse.July_21600x43200-1024x512.jpg 1024w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Diffuse.July_21600x43200-300x150.jpg 300w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Diffuse.July_21600x43200-768x384.jpg 768w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Diffuse.July_21600x43200-500x250.jpg 500w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Night_21600x10800.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"424\" src=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Night_21600x10800-1024x512.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Night_21600x10800-1024x512.jpg 1024w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Night_21600x10800-300x150.jpg 300w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Night_21600x10800-768x384.jpg 768w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Night_21600x10800-500x250.jpg 500w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p style=\"text-align: center;\"><em>Left show the surface of the earth in daylight, right shows the surface of the earth at night with city lights visible and a faint ambient light in other areas which could indicate lighting by the moon.<\/em><\/p>\n<div id='gallery-2' class='gallery galleryid-331 gallery-columns-3 gallery-size-large'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Bump_21600x10800.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"424\" src=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Bump_21600x10800-1024x512.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Bump_21600x10800-1024x512.jpg 1024w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Bump_21600x10800-300x150.jpg 300w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Bump_21600x10800-768x384.jpg 768w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Bump_21600x10800-500x250.jpg 500w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Clouds_21600x10800.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"424\" src=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Clouds_21600x10800-1024x512.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Clouds_21600x10800-1024x512.jpg 1024w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Clouds_21600x10800-300x150.jpg 300w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Clouds_21600x10800-768x384.jpg 768w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Clouds_21600x10800-500x250.jpg 500w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Specular_21600x10800.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"424\" src=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Specular_21600x10800-1024x512.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Specular_21600x10800-1024x512.jpg 1024w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Specular_21600x10800-300x150.jpg 300w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Specular_21600x10800-768x384.jpg 768w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Earth.Specular_21600x10800-500x250.jpg 500w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p style=\"text-align: center;\"><em>Left shows the bump map of the earth, middle show the cloud map and right show the specular map for the\u00a0oceans and water regions.<\/em><\/p>\n<p>The Moon is only seen from a distance in the animation, however I\u00a0planned for the Moon to be shown more up-close so the surface texture for the moon are also the same 21600 x 10800 pixels large as for the earth, and for the topography I used a normal map instead of a bump map in this case (couldn&#8217;t find a high resolution normal map for the Earth).<\/p>\n<div id='gallery-3' class='gallery galleryid-331 gallery-columns-2 gallery-size-large'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Diffuse_21600x10800.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"424\" src=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Diffuse_21600x10800-1024x512.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Diffuse_21600x10800-1024x512.jpg 1024w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Diffuse_21600x10800-300x150.jpg 300w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Diffuse_21600x10800-768x384.jpg 768w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Diffuse_21600x10800-500x250.jpg 500w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Normal_8192x4096.jpg'><img loading=\"lazy\" decoding=\"async\" width=\"848\" height=\"424\" src=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Normal_8192x4096-1024x512.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Normal_8192x4096-1024x512.jpg 1024w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Normal_8192x4096-300x150.jpg 300w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Normal_8192x4096-768x384.jpg 768w, https:\/\/richardandersson.net\/wp-content\/uploads\/2016\/08\/Moon.Normal_8192x4096-500x250.jpg 500w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p style=\"text-align: center;\"><em>Left shows the surface of the Moon and right shows the normal map of the Moon.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Modelling and rendering of computer generated imagery (CGI) have been a hobby of mine for some time. In my work as a scientist I have used this skill to model and animate\u00a0devices, however I have also animated and rendered scenes just for fun and to learn new techniques. From\u00a0my interest for astronomy and space-technology I&hellip; <\/p>\n<p><a class=\"more-link\" href=\"https:\/\/richardandersson.net\/?p=331\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-331","post","type-post","status-publish","format-standard","hentry","category-projects","xfolkentry","clearfix"],"_links":{"self":[{"href":"https:\/\/richardandersson.net\/index.php?rest_route=\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/richardandersson.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/richardandersson.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/richardandersson.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/richardandersson.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331"}],"version-history":[{"count":7,"href":"https:\/\/richardandersson.net\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":366,"href":"https:\/\/richardandersson.net\/index.php?rest_route=\/wp\/v2\/posts\/331\/revisions\/366"}],"wp:attachment":[{"href":"https:\/\/richardandersson.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/richardandersson.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/richardandersson.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}