In this recipe, we will create a realistic Earth as shown in the following screenshot, using both image textures from the Web and some procedurals:
The Earth as it appears in the final rendering
The image textures provided with this Cookbook have generally been heavily down-scaled and are good for demonstration purposes only (in this case, for a very distant Earth render). For better results with this recipe, replace these low-resolution images with high-resolution versions that you can find at these addresses:
Before you download anything, always take a look at the license of the images provided by any site you can find to ensure that they are released as freely usable, especially if you are going to use them for commercial work. All the preceding links should be okay, but on the Internet, things can change quite quickly, so double-check!
You will need at least five image maps for this recipe: Earth-color, the color of the land or sea in daylight; Earth-night, the color of the land or sea at night (usually provided with superimposed city lights); Earth-bump, a gray-scale, high map of the continents; Earth-spec, an outline with the continents in black and the water masses perfectly white; and Clouds, a gray-scale map of the clouds as shown in the following screenshot:
The five image textures
Actually, Cycles can handle very big textures pretty well, even 16 K images (that is, images made by 16.000 pixels for the longest side), so you can use them at the best resolution you can find. Be aware that the bigger the resolution of the textures, the longer the rendering times, especially if they are used as bump maps.
Now perform the following steps:
Earth_Surface
.2.00
and rename it as Empty_terminator
. Go to the Object Constraints window and assign a Damped Track constraint to the Empty_terminator. In the Target field, select the Sun item (the Lamp), and in the To field, click on the X button.UVMap_terminator
.1.001
. Rename it as Earth_Clouds
.1.002
, and rename it as Earth_Atmosphere
.Empty_Earth
. In the Object data window, set its Size to 2.00
. Press Shift and select the Earth_Surface, Earth_Clouds, Earth_Atmosphere, and the Empty_Earth objects. Press Ctrl + P and click on Object to parent the three UV Spheres to Empty_Earth.18.387°
, Y to 0.925°
, and Z to -4.122°
(you can obviously rotate the Empty_Earth as you wish, but this helps provide a nice point of view on the specular effect showing on the oceans).-0.64000
, Y to -4.70000
, and Z to 0.12000
. Then set the Rotation values of X to 89°
, Y to 0°
, and Z to -9°
. Go to the Object data window and change the Focal Length to 60.000
(millimeters). Press the 0 key on the numeric keypad to go to the Camera view.0.050
and the Strength to 10.000
. Set the Color values for R to 1.000
, G to 0.902
, and B to 0.679
. In the Transform panel, set the Location values of X to 158.00000
, Y to -27.00000
, and Z to 107.00000
. For Rotation, set X to 1.5°
, Y to 56°
, and Z to -8°
(Sun lamps don't need a location, but in this case, we need it to establish a target for a later-to-come day/night terminator trick).1.00
, the Preview samples to 20
, and the Render samples to 50
.1.000
. Then click inside the curve window to add a new point, and place it at position X as 0.61149
and Y as 0.71250
. Then set the value of the B channel for the White Level between 0.800
and 0.850
.After the creation of the 3D scene and the setting of the lighting, let's go for the materials, starting with the planet's surface.
In the Outliner (just temporarily), hide the Earth_Clouds and Earth_Atmosphere objects by clicking on the little eye icons to the right side of the names. This is to see only the Earth_Surface in the viewport, rendered and updated in real time as we work on the material:
Surface
.1.000
. In the second Shader slot, load a Glossy BSDF node. Then set its Roughness value to 0.700
and Distribution to Beckmann. Set the Fac value of the Mix Shader to 0.100
.Diffuse_Lands
and Glossy_Lands
and the Mix Shader as Mix Shader_Lands
.textures
directory, and load the Earth-col_low.png
image (or a high-resolution version, if available). Label the image node as Color_Day
.Bump
. Then click on its Open button and load the Earth-bump_low.png
image. Set the Color Space to Non-Color Data. Label the Bump node as Bump_Lands
and set the Strength value to 0.020
.0.300
, and the Color2 value for R to 0.072
, G to 0.127
, and B to 0.578
.LANDS
as shown in the following screenshot:The LANDS frame
1000.000
and connect its Color output to the Height input socket of the Bump node. Label this node as Bump_Seas
, set the Strength value to 0.015
, and connect its Normal output to the Normal input sockets of the new Diffuse BSDF and Glossy BSDF shaders. Label them as Diffuse_Seas
and Glossy_Seas
and set the Glossy BSDF node's Roughness value to 0.150
.SEAS
.Mix Shader_Seas
, and place it just under the Mix Shader_Lands node. Set the Fac value to 0.100
. Connect the output of the Diffuse_Seas node to the first Shader input, and the output of the Glossy_Seas node to the second Shader input socket.Mix Shader_Surface
. Connect the output of the Mix Shader_Seas node to its second Shader input socket.Spec/mask
. Connect its Color output to the Fac input socket of the Mix Shader_Surface node. Click on the Open button to load the Earth-spec_low.png
image. Set the Color Space to Non-Color Data.SEPARATOR LANDS/SEAS
.0.002
, G to 0.002
, and B to 0.022
.ColorRamp01
. Connect the Color output to the Color input of the Glossy_Seas shader. Set Interpolation to B-Spline. Change the black color stop (index 0) to pure white and the white color stop values (index 1) for R to 0.072
, G to 0.127
, and B to 0.578
, with Alpha value set to 0.000
. Move it to 0.150
position. Click on the + icon button to add a new color stop. Change its Color values for R to 0.965
, G to 0.462
, B to 0.223
, and Alpha to 1.000
. Move it to 0.075
position.0.200
as shown in the following screenshot:The LANDS and the SEAS frames connected and separated by the simple SEPARATOR LANDS/SEAS
Color_Night
and the ColorRamp as ColorRamp02
.Earth-night_low.png
image. Set the ColorRamp02 node's Interpolation to B-Spline and move the black color stop to 0.250
position. Then move the white color stop to the 0.495
position. Set the MixRGB node's Blend Type to Multiply, the Fac value to 0.700
and the Color2 values for R to 1.000
, G to 0.257
, and B to 0.090
. Set the Emission node's Strength value to 1.000
.NIGHT
. This is shown in the the following screenshot:The NIGHT frame
UVMap_terminator
. Set the ColorRamp node's Interpolation to B-Spline. Then move the black color stop to 0.500
and the white color stop to the 0.000
position. Click on the + icon button to add a new color stop. Set its color to pure black as well.TERMINATOR
.Mix Shader_Terminator
, and paste it just between the Mix Shader_Lands and the Mix Shader_Surface nodes. Connect the output of the Emission node inside the NIGHT frame to its second Shader input socket, and the Color output of the ColorRamp inside the TERMINATOR frame to its Fac input socket as shown in the following screenshot:The TERMINATOR frame added to the surface material network
As second planet material, let's go with the clouds by performing the following steps:
Clouds
.Mix Shader_Clouds
, and in the first Shader slot, load a Transparent BSDF shader. In the second Shader slot, load a new Diffuse BSDF shader. Set the color of both the shaders to pure white.Clouds
and the Bump node as Bump_Clouds
. Connect the Bump node's output to the Normal input of the Diffuse_Clouds node. Set the Strength value to 0.020
.Clouds_low.png
image. Set the Color Space to Non-Color Data.1.000
. Connect the Color output to the Height input socket of the Bump_Clouds node and to the Fac input socket of the Mix Shader_Clouds node.32°
, Y to 17°
, and Z to 5°
.CLOUDS
. This is shown in the screenshot:The CLOUDS material
The third planet material is the atmosphere layer:
Atmosphere
.Mix Shader_Atmos1
, and in the first Shader slot, load a Transparent BSDF shader (label it Transparent_Atmos1
). In the second Shader slot, load a Diffuse BSDF shader (label it Diffuse_Atmos1
).ColorRamp03
). Set the ColorRamp03 node's Interpolation to B-Spline, move the black color stop to the 0.395
position, and set the Alpha value to 0.000
. Set the color of the white color stop (index 1) for R to 0.072
, G to 0.127
, and B to 0.578
.0.500
.ATMOSPHERE
.ColorRamp04
).UVMap_terminator
. Set the ColorRamp04 node's Interpolation to B-Spline. Then move the black color stop to the 0.400
position and the white color stop to the 0.600
position, but change this stop's color to black as well. Click on the + icon button to add a new color stop. Set its color to pure black and move it to the 0.450
position. Click on the + icon button again to add a new color stop. Set its color to pure black and move it to the 0.550
position. Set the Alpha of all the four black color stops to the 0.000
. Click once more on the + icon button to add a new color stop. Set its color values for R to 1.000
, G to 0.047
, and B to 0.005
. Set Alpha value to 0.100
and move it to the 0.500
position.Mix Shader_Atmos2
, Transparent_Atmos2
, and Diffuse_Atmos2
.RED_TERMINATOR
.Mix Shader_Atmos3
, and set the Fac value to 0.950
. Connect the output of the RED_TERMINATOR frame to the first Shader input socket and the output of the ATMOSPHERE frame to the second Shader input socket. Then connect the output of the Mix Shader_Atmos3 node to the Surface input socket of the Material Output node as shown in the following screenshot:The RED_TERMINATOR and the ATMOSPHERE frames
The three overlapping UV Spheres technique is quite old, and (at least for what relates to Blender) dates back to almost 2004—more precisely to the How to make a realistic planet in Blender(2004) tutorial I wrote at that time for Blender version 2.23/2.30 (http://www.enricovalenza.com/rlpl.html). That tutorial is now outdated, but the technique and basic concepts still work, even in Cycles. Hence, we get the planet surface on the smaller of the spheres, a clouds layer on a slightly bigger sphere, and the enveloping atmospheric Fresnel effect on the biggest sphere.
We divided the material creation process into the three stages, corresponding to the three layers/spheres. First, we built the more complex of all the three shaders that is the Surface material:
Earth-spec
map, a black-and-white image working as a stencil for the factor input of the Mix Shader_Surface node. We also connected the Earth-color
map to the SEAS diffuse shader to bring color back to the oceans.Clouds
layer on the second sphere. We added more variety to the single Clouds_low.png
image by superimposing and offsetting (the mapping rotation of) a copy of the same cloud image.Atmosphere
layer on the third (bigger) sphere, with the Fresnel atmospheric effect and the reddish terminator.As you have probably noticed, we didn't use any Texture Coordinate or Mapping nodes to map the image maps. This is because the UV Spheres had been unwrapped with Image Texture nodes. The existing UV coordinate layer was automatically taken into account by Cycles for the mapping.
For the ocean bump, which was obtained by the Noise procedural, the Generated mapping option was automatically used.
Thanks to the Damped Track constraints, which were targeted to the position of the Sun lamp, we could use the Empty_terminator object as a UV coordinates projector for the day/night division on the planet surface and for the red colored transition zone (the red terminator) in the Atmosphere
layer.