• Blender 2.77a advanced Earth tutorial (5-29-16)

    Contents:

    1. Intro
    2. Getting Started
    3. The Outliner
    4. The Earth's Land/Sea Texture
    5. The Clouds Texture
    6. Atmosphere
    7. Normal Mapping
    8. Increasing the Render Quality
    9. Finishing Touches
    10. Wrapping Up

    Intro

    In this tutorial, we are going to create a realistic looking Earth in Blender 2.77a. In my pervious Blender post about Earth, we were able to map the texture of Earth onto a sphere in front of a starry background. It looked OK, but it wasn’t particularly realistic. This tutorial will walk us through the steps from starting with the defualt Blender project to finishing with a realistic Earth including clouds and atmosphere:

    Finished result from tutorial (High resolution)

    Not bad! :grinning: I used a NASA composite image as reference when making this tutorial:

    NASA reference image (Link to Source)

    Another cool thing about this tutorial is that we’ll learn how to vary certain parameters and use some compositing tricks in order to change the Earth’s appearance based on how it looks in a variety of reference images.

    Getting Started

    If you have never used Blender before, this tutorial will most likely be extremely confusing. If that is the case, then I recommend starting with my basic Earth tutorial, in which I go over a lot of Blender basics and take things a little more slowly in terms of navigating through the GUI. The textures we will be using are all sourced from NASA’s Visible Earth collection of images. I have included medium-resolution versions of these files in the zipped folder of the project in order to keep the file-size down, but if you would like to experiment with higher resolutions you can simply download the originals from the NASA webpage and load them into Blender where the current textures in the project reside. The files we will be using are as follows:

    In addition to using Blender, we will need an image editor to process the clouds file and make an additional texture. We will be using the GNU Image Manipulation Program (GIMP) for these tasks, although other image editors may be suitable. GIMP, like Blender, is open-source and free.

    Open up Blender, and (if you haven’t set the default project to something else) you’ll be greeted with the default project of the cube, lamp, and camera. Delete the cube.

    Next, with the 3D cursor at the center of the 3D scene, add an Ico Sphere.

    This particular sphere will display the Earth’s topography. On the left of the 3D View editor window, the Toolbar should be displayed (if not, press ‘t’ to toggle it’s display). With the Ico Sphere selected, under the Shading subsection in the Toolbar’s Edit section, click Smooth. You should see the Ico Sphere change to a much smooter appearance.

    To make the sphere even smoother, we will add a subdivision subsurf modifier. In the Modifiers tab (labeled with a blue wrench icon) of the Properties editor window (displayed at the left of the screen by default), click Add Modifier and select Subdivision Surface.

    Now the sphere should look even smoother. This is becuase adding the Subdivision Surface modifier (“subsurf”) increases the vertex density of the model it is applied to, enabling rounder edges of its polygons. In the Subdivisions section of the modifier window, change View to 2 and Render to 3. This will apply subsurf by a factor of 2 during editing and by a factor of 3 while rendering (which takes more time but yields better results).

    The Outliner

    Above the Properties editor window, by default the Outliner editor window is displayed (top right hand corner). The Outliner contains information about all of the objects in the current scene and makes it easy to select specific objects without having to locate them in the 3D scene. In order to keep track of the various elements we will be adding, double click on the Ico Sphere’s name in the Outliner and rename it to Earth.

    Next, we are going to add an object that will display the clouds texture. This process will be the exact same as it was for adding the first sphere, except we will be scaling it slightly larger. With the 3D cursor still at the center, add another Ico Sphere.

    Apply the same Smooth shading and Subsurf modifier to this sphere like the previous one. Now scale the new Ico Sphere so that it is just slightly larger than the first sphere. To acheive fine-grain scaling, press s and then hold shift while moving the mouse. I scaled the sphere up to 1.006.

    In the Outliner Editor, rename this Ico Sphere to Clouds:

    Now we are going to add another sphere to be the atmosphere.

    Apply the same Smooth shading and Subsurf modifier to this sphere like the previous two spheres. Scale this sphere up to slightly larger than the Clouds sphere, but more so. I scaled this sphere up to 1.020.

    In the Outliner Editor, rename this Ico Sphere to Atmosphere.

    Next, we are going to establish parent-child relationships between the Earth object and the Cloud and Atmosphere object. This can be done in the Outliner by dragging the icon of the object to become the “child” onto the name of the object to become the “parent”. Drag the icon of the Clouds object and drop it onto the Earth object in the Outliner.

    Now set the Atmosphere object as a child of Earth by dragging it onto the Earth object.

    The Clouds and Atmosphere objects should now be listed as children inside Earth’s dropdown in the Outliner. You can view Earth’s children elements by clicking the small plus circle to expand and collapse the hierarchy.

    The Outliner can also enable us to hide/show certain objects from the 3D editing view and the render. Since we are going to first start editing the Earth’s land and sea texture, click on the camera and eye icons in the outliner next to the Atmosphere and Clouds objects to temporarily disable them.

    The Earth's Land/Sea Texture

    Now select the Earth sphere. In the Material tab of the Properties editor window, click New to add a new material.

    In the resulting material options, change the Diffuse intensity slider to 1 and the Specular intensity slider to 0.

    In the Textures tab of the Properties editor, click New to add a new texture.

    Make sure the new texture’s type is “Image or Movie”, and under the Image section click open.

    In the file browser, select the image that shows Earth’s land and sea (which is the “Blue Marble Next Generation w/ Topography and Bathymetry” image).

    Once the image has been selected, in the Image Mapping section, set the Extension drop-down to Clip.

    In the Mapping section, set the Projection drop-down to Sphere and the Coordinates drop-down to Generated.

    Next, select the Camera.

    Using the Properties sidebar of the 3D View editor (which can be displayed on the right of the 3D View editor by pressing n or by toggling it from the View menu option), change the camera’s X, Y, and Z location and rotation values to 0. Then change the camera’s X location so that it is in front of the Earth.

    Now set the camera’s X and Z rotation values to 90 degrees so that the camera is facing the Earth.

    Switch to the camera’s viewpoint by navigating to the View menu option and selecting “Camera” or by pressing numpad 0.

    The result of switching to the camera’s viewpoint should look like this;

    Now fine-tune the camera’s position so that the Earth fills most of the vertical space inside the camera’s viewport.

    Now render the scene by either pressing the keyboard shortcut F12 or navigating to the Render tab (depicted with a camera icon) in the Properties editor window and clicking on the Render button.

    The resulting render should show the Earth’s sphere with the texture applied:

    Since the render result is a little dark, we are going to re-position the lamp. Change out of the camera viewpoint.

    Select the lamp.

    In the Properties sidebar of the 3D view, set the X, Y, and Z location and rotation values to 0. Move the lamp behind the camera by adjusting the lamp’s X location parameter.

    With the lamp selected, in the Properties Editor select the Object Data tab (depicted with a Sun icon) and under the Lamp section, change the type to Sun.

    This will give the lamp a direction. Using the properties sidebar in the 3D view, change the lamp’s direction so that it is facing the sun by setting it’s Y rotation value to 90 degrees.

    If we render the scene again, the sphere should look much more well-lit:

    Notice that we can change the appearance/shading of objects in the 3D view by changing the dropdown represented by a sphere icon next to the “Mode” dropdown in the 3D view menu bar. We can change it from the default “solid” to “texture” viewport shading:

    Clouds Texture

    Now that we have our Earth’s land and sea texture in place, we can start working on the clouds sphere. In the Outliner, enable the cloud object to be displayed in the 3D view and renders by clicking on the eye and camera icons next to the cloud object to make it visible.

    Since our clouds texture has a black background (representing an absence of clouds), we want to convert the black to transparency. We could do this in Blender using nodes and ramping the color of the texture image, but we can accomplish the same results with GIMP. Open up the clouds texture in GIMP.

    In the Colors menu option, select Color to Alpha.

    Set the “From” field to solid black so that black will be replaced by transparency.

    The resulting image should show that black has been replaced by transparency.

    Export the image as a .png file.

    Create a new material and texture for the clouds sphere just like we did for the Earth sphere (including setting the Diffuse and Specular settings like we did earlier) and set the texture image to the png we just exported from GIMP. underneath the Preview section in the Textures tab of the Properties Editor Window, check the box that’s labeled Show Alpha in order to view the transparency of the texture.

    Now the preview image should dispaly the texture as being transparent and the texture displaying over the material (which is still opaque):

    In the textures tab, scroll down to the Influence section and check the box next to Alpha. This will enable us to hide the material while keeping the texture visible.

    Next, switch to the Material tab, enable Transparency by checking the checkbox next to the Transparency section, expand the Transparency section and set the Alpha slider to 0.

    Scroll down further to the Shadow section and uncheck the options related to casting shadows (Cast, Cast Only, Cast Buffer Shadows, Cast Approximate).

    If we render the scene at this point, we should be able to see the clouds texture over the Earth’s land/sea texture.

    The only problem is that this makes the Earth look a little too cloudy, so let’s decrease the cloudiness by ramping the threshold of the lowest visible transparent ares up. Switch to the Textures tab, and in the Colors section, check the Ramp checkbox.

    This will display a gradient with two sliders at opposite ends by default. The default color stop for the 0th (leftmost) slider is black, but since we are dealing with clouds in various shades of white, we want to change the color stop to white as well. Click on the color stop and use the color picker to set the color to solid white.

    Then slide the leftmost slider to the right (or type in the value in the Position (Pos:) slider) so that it is at the point 0.100.

    Doing this will cut out the lightest looking/ mostly transparent clouds, making the Earth look a little less cloudy.

    Atmosphere

    So far so good! Now we are going to work on the atmosphere object. In the outliner, enable the Atmosphere object in the 3D View and renders by clicking on the eye and camera icon.

    Next, create a new material for the Atmosphere, setting the Diffuse intensity to 1 and the Specular intensity to 0. Since the Earth’s atmosphere appears blue in reality, set the color box under the Diffuse section to pure blue (Blue 100%, Red 0%, Green 0%).

    Since we want the atmosphere to be mostly transparent, enable the Transparency section by checking the box next to Transparency, then set the Alpha slider to 0.150.

    Scroll down further to the Shadow section. We don’t want the atmosphere to cast a shadow, so uncheck all options related to casting a shadow (Cast, Cast Only, Cast Buffer Shadows, Cast Approximate).

    In order to make the atmosphere appear less visible at the center of the Earth and more visible towards the edges, we need to adjust the Power of Fresnel in the Transparency section. Scroll back up to the Transparency section and set the Fresnel slider to 3.0.

    Now render the scene. We should be able to see the atmosphere as a light blue shade around the edges of the Earth.

    Let’s add a plane to give the Earth a black background. With the 3D cursor at the center of the 3D scene, add a plane.

    Set the rotation Y value of the plane to 90 degrees, move it so that it is behind the spheres and scale it upward so that it fills the viewport of the camera.

    Create a new material for the plane, and under the Diffuse section set the color to solid black.

    In the Shading section, check the Shadeless checkbox to make the plane insensitive to light and shadow.

    If we render the scene now, our Earth should be starting to look slightly realistic with a black background!

    Normal Mapping

    So far we’ve used the “Blue Marble Next Generation w/ Topography and Bathymetry” and clouds images as textures, now we are going to use the topography texture as a bump map. In the Outliner editor window, select Earth as the active object. Then switch to the Textures tab in the Properties editor window, select the next empty texture slot after the texture we already have applied to Earth, and click the New button to create a new texture.

    Set the type of this new texture to “Image or Movie” and load the Topography image in the file browser as the texture.

    Set the Image Mapping section’s extension to Clip, the Mapping section’s Projection to sphere, and Coordinates to generated. Then in the Influence section, enable the Normal slider by checking it in the Geometry subsection. This will apply the topography texture as a Normal map to the land/sea texture we already have applied to the Earth, which will visually emphasize the variations in elevations on Earth caused by things mountain ranges.

    If we render the Earth now, even at the default resolution of 50% 1920 x 1080 pixels we are able to see the Andes Mountains “pop” out of the Earth more due to their height relative to sea-level.

    But this amount of normal mapping is a little too exaggerated, so we are going to tone down the effect by setting the Normal slider to 0.250.

    Now the normal mapping looks much more subtle (practically indiscernible at low resolutions).

    Increasing the Render Quality

    We’ve been rendering the 3D scene at a relatively low resolution for the sake of speed, but now we are ready to start making small adjustments that will be more noticable at higher resolutions. In the Render tab of the Properties editor window, change the Resolution slider in the Dimensions section to 100% of 1920 x 1080 pixels.

    The render will now look much sharper:

    Let’s keep increasing the render resolution since our textures are high resolution. Double 1920 x 1080 pixels to 3840 x 2160 pixels.

    We’re also going to want to bump up the amount of subsurf we have applied to each sphere since we are going to inspect the Earth much more closely (and want it to appear as smooth as reasonably possible). For each of the Earth, Clouds, and Atmosphere objects, increase the subsurf in the Modifiers tab to 4 (or more, if you have a mighty computer) for the render.

    At this resolution, the renders start looking much more impressive.

    Finishing Touches

    At this point, we could call it a day since our Earth looks pretty good. But since we are aiming for a great and not just good amount of realism, we are going to compare our resulting image to an official NASA image side-by-side. The way we will do this is by creating a new window that will split the current 3D view window in half vertically. On the upper edge of 3D view window, right click and select Split Area, then set the new window to take up roughly half the size of the current 3D view window.

    In the Editor Type drop-down (technically it expands upwards, so as the opposite of a drop-down, a … throw up?) located in the corner of the new window’s menu, select UV/Image Editor as the type.

    By default this will show the render result, but we are going to load the NASA image by bringing up the Properties sidebar (press n) and clicking on the folder icon in the Image section. This will display the file browser where we will be able to select our image. Here is the source of the NASA image we are using for comparison. Note that you can use any reference image of Earth, but we will be going over techniques related to making our renders look like the reference image listed for this tutorial.

    Once the NASA image (the “Blue Marble”) has been loaded, adjust the zoom of both the render and the Blue Marble so that they are roughly equal.

    Our Earth looks a little dark by comparison, so let’s start by bumping up our sun lamp’s intensity. Select the lamp and in the Properties editor, navigate to the lamp’s Object Data tab and set the Energy slider to 1.3.

    The lighting of our Earth now looks a little closer in subsequent renders.

    Our Earth’s atmosphere looks too dark compared to the Blue Marble’s, so let’s adjust the Atmosphere’s object Material to have a lighter shade of blue (Blue 100%, Green 17.5%, Red 0%).

    That looks better, but the atmosphere looks a little too “thick” around the center in our render, so in the Material tab, set the Fresnel slider in the Transparency section to 2.5. Also bump the Alpha slider up to 0.200.

    Next, we are going to tackle the issue of the shadows appearing on the Blue Marble. We could fuss with the lamp Type/Energy/Location/Rotation settings until we had a good combination, but I think an easier way in this case, if we are trying to match a stationary reference image, is to match the shadows using shadow textures. To do this, start by creating a new plane.

    Adjust the new plane’s Y rotation to 90 degrees and adjust the X location value so that the plane is just in front of the spheres. Add a new material to the plane.

    We are going to use GIMP to create the shadow texture, which is really just a gradient that fades evenly from transparency to solid black. Once again, we could have gone about this approach a couple of different ways in Blender (including the use of the Nodes editor), but I think using GIMP is simpler. In GIMP, create a new 8000x8000 image, set the gradient tool to the “FG to Transparency” option, and create an even fade from transparency on the left to black on the right.

    Export this image as a .png file. Back in Blender, create a new texture for the plane, set its type to “Image or Movie”, and load the shadow texture we just created in GIMP. In the Preview section, enable the Show Alpha option by checking the checkbox.

    Set the Image Mapping Extension dropdown to Extend and the Mapping Coordinates to Generated. Switch to the camera’s viewpoint in the 3D View window and move the plane across the Y axis so that the plane’s right edge is roughly even with the right edge of the spheres.

    In the Influence section, enable the Alpha slider by checking the checkbox next to Alpha.

    Render again, and we’ll see a nice shadow covering the right half of our Earth.

    Using the gradient has made our Earth a little darker, so let’s bump up the intensity of our sun lamp. Select the lamp, and set it’s Energy level to 3.0

    Re-render the Earth, and it should look a lot closer to the Blue Marble in terms of shading and brightness.

    Notice that in the Blue Marble there is a small specular highlight from the sun near the western coast of Mexico. Let’s create that in our render by selecting the Earth, navigating to the Material tab in the Properties editor, and setting the Specular intensity to 0.150.

    Now let’s slightly decrease the transparency of the atmosphere. Select the Atmosphere object, and in the Transparency section of the Material tab set the Alpha slider to 0.300.

    Our Earth is looking better and better. The color of our render looks a little off from the color of the Blue Marble, so we are going to fiddle with the settings of Earth’s land/sea texture in the Colors section. Select the Earth, navigate to the Texture tab and in the Colors section set the Brightness to 1.080 and the Contrast to 1.100.

    Now let’s make our Earth slightly brighter. Select the lamp and increase its Energy slider to 3.200.

    We can rotate our Earth so that its rotation more closely matches that of the Blue Marble. Select the Earth and adjust its Y rotation to roughly 30 degrees and its Z roation to roughly 13 degrees.

    We think that we accidentally made things a little too bright, so bump the lamp’s Energy slider back down to 3.000.

    Comparing the clouds between our Earth and the Blue Marble, our clouds are not quite “present” enough so we are going to adjust the ramping slider we set earlier. Select the cloud object, navigate to the Texture tab, and in the Colors section set the Ramp slider of stop 0 (leftmost slider) to 0.080.

    We also think that the Earth’s brightness and contrast looked better as they were originally, so select the Earth and in the Texture tab set the brightness and contrast sliders in the Colors section back to 1.000.

    The normal mapping is also a tad too strong, so select the topography texture in the Textures list and set the Normal Slider in the Influence section to 0.175. Our Earth now looks even closer to the Blue Marble.

    In addition to having a shadow on its right edge, the Blue Marble also has a shadow on its upper edge. To create this effect for our Earth, we are going to duplicate our current shading plane. Select the plane we are using for the shading texture, and in the Toolbar click on Duplicate to create a copy of the plane.

    Set this new plane’s Y rotation value to -90 degrees.

    Now move the new plane so that it is in roughly the same location that its duplicate is in, then move it forward along the X axis very slightly. Since the shadow on the top of the Blue Marble looks less far-reaching than the right edge shadow, decrease the new plane’s X scale to 0.500 (which will shorten the shadow gradient).

    The additional shadow makes our Earth pretty dark.

    So let’s increase our sun lamp’s Energy slider to 4.000.

    Let’s adjust the colors of our Earth again. Select the Earth, and in the Material tab change the Brightness to 1.1, Contrast to 1.2 and Saturation to 1.1 in the Colors section.

    Wrapping Up

    Now our Earth is rocking! Our Earth’s ocean still doesn’t really look like the same shade of blue overall as the ocean in Blue Marble, our normal mapping looks like it might still be a little overkill, and our atmosphere’s outer edge isn’t “soft” like the one in the Blue Marble, but we are going to call it a day here. As we noticed, after a certain part of the tutorial a lot of the refinement of our Earth revolved around adjusting a few select parameters, which is most likely what it would take to go the extra mile and fix the current mistakes just mentioned. Note that the scientists at NASA used several more “elements” in their composite of the Blue Earth (you can read more about that effort here), but our approach roughly follows the steps used to achieve the Blue Marble composite.

    That’s all for the advanced Earth tutorial! :earth_americas: If you’ve made it this far, hopefully some things in this tutorial have been helpful. Thanks for reading, and check back regularly for more Blender tutorials.

    Link to zipped project files