Photoreal 3D Earth
By Dean A. Scott
Published: 5/8/11

This tutorial was written by Dean A. Scott who has graciously allowed us to host it here at Foundation3D.

It was originally written for LightWave 3D version  6 but should still be relevent to the current version.



So, you want to make a photo-realistic rendering of the Earth from orbit, eh? And you want it to look just like what astronauts see from the shuttle or ISS (International Space Station). No problem. Just follow these simple steps and you'll be there in no time. There's really nothing to the actual objects needed... there's just three highly subdivided spheres, each slightly larger than the other.

Note: We have included the objects, texture maps and scene files at the end of the tutorial.

In this tutorial, I'll be describing most of the whys of what I'm doing so you can apply these techniques to almost any other type of planet. Just a note, for orbital level points of view, which is around 200 to 250 miles in altitude, you'll need very high resolution images of the Earth's surface, topography, and clouds (on the order of 10,000 x 5,000 pixels) so that they don't become pixelated when rendered at these distances. For medium and long shots of the full disc of the Earth, images that are 2048 x 1024 pixels will do just fine.

There are a lot of Earth images at many different resolutions available on-line, so these images are not provided in the zip file above. James Hastings-Trew and NASA's Blue Marble sites have all that you need for 1K all the way to 10K resolution images

LET'S GET STARTED!

  1. In Modeler, make a Sphere that's 127.6 KM in diameter with 96 sides and 48 segments. Use the Numeric input to enter these values.

    This is 1/100th the size of our Earth. Using a decimal fractional value of the real thing allows for more precise modeling of the other two objects yet to follow.

  2. Give this sphere a surface name of "Earth - Surface" and Save the object as "Earth-Surface.lwo"

  3. Select the Size tool and its Numeric input and increase diameter by entering 100.2%, then clicking Apply. This enlarges the sphere so that the cloud tops are around 15 miles above the surface (relatively speaking, that is... the actual scale is 1/100th that in these models).

  4. Close the Numeric input and give this object a new surface called "Earth - Clouds" and Save it as "Earth-Clouds.lwo"

  5. Undo the changes to surface and size by pressing the 'u' (undo) key twice to get back to the original object. Now, Size up the sphere again, this time by 101.7%. Give it a new surface name of "Earth - Atmosphere" and Save as "Earth-Atmosphere.lwo"

    This expands the sphere so that it extends about 120 miles or so (relative to the scale) which is where the atmosphere thins out to nothing (or there abouts, it doesn't have to be exact as shading this sphere will not be a precise science in achieving an exact maximum altitude for the end of the atmosphere anyway. Plus, the atmosphere always has a different look depending on the Sun's illumination angle and a myraid other factors that just can't be simulated in 3D. Some photos of the Earth from shuttle orbital altitudes show an extremely prominent limb, while others don't appear to have much of a fuzzy edge at all.)

That's it for Modeler. Close it and run Layout.


TEXTURING THE EARTH'S SURFACE

  1. Load into Layout the "Earth-Surface.lwo" object.

  2. Open the Surface Editor. Turn Smoothing On for "Earth - Surface" and set up the Color Channel as follows.

    (Note: All parameters not listed use their default values and all image maps have Pixel Blending On and Texture Antialiasing Off).

    Color Base RGB
    90
    115
    150
      Texture Layer Type Image Map 
        Opacity 50% 
        Projection Spherical 
        Image your Earth image here 
        Axis Y 

    The base dull bluish color above mixes with your desired Earth image map by setting it's opacity to 50%. This simulates the atmospheric scattering of light which pales and tints the land masses a bluish color. Set the opacity to 100% if you are using an image that has already been color corrected to account for this effect.

  3. Set Diffuse to 70% to compensate for the brightening effect that the atmosphere object surface will have on it and add the following texture...

    Diffuse Texture 1 Layer Type Image Map
        Opacity 50% (or as desired)
        Invert Layer ON if using white clouds on black oceans
        Projection Spherical
        Image your cloud image here
        Axis Y
        Rotation H = 0.1, P = 0.0, B = 0.0

    This is my poor man's (read that as really fast) method of faking cast shadows by the cloud object onto the surface object. By using the same cloud image map with a +/-0.1 degree heading rotation offset relative to both the camera viewing angle and the Sun incident angle, " shadows" that are indistinguishable from actual (and very much slower) ray traced shadows are created by the decreased diffuse values on the surface by the image map. The ONLY problem with this method is that it's not interactive with the light that's "casting" the "shadows." That is, the angle of the light and/or the camera relative to the Earth does not affect the offset of the shadows. Luckily, the rotation of the alpha mode image can be enveloped, so it is possible to change it over time to compensate and create the illusion of shadows getting "longer" (more offset) or "shorter" (less offset) based on the combination of camera view and light illumination angles.

  4. Set up the Specular Channel as follows:

    (Note: Layer ORDER is critical. Layer 1 is on the TOP of the stack in the left hand surface bin pane)

    Specular Base 0%  
      Texture 1 Layer Type Image Map 
        Opacity 30% 
        Invert Layer ON if using white land on black oceans 
        Projection Spherical 
        Image your specular image here 
        Axis Y 
      Texture 2 Layer Type Image Map 
        Blending Mode Alpha 
        Invert Layer ON if using white land on black oceans 
        Projection Spherical 
        Image same 
        Axis Y 
      Texture 3 Layer Type Gradient 
        Input Incident Angle 
        Key 1 Value 200%
          Parameter 0 deg
        Key 2 Value 200%
          Parameter

    20 deg

        Key 3 Value 0%
          Parameter 50 deg
      Texture 4 Layer Type Procedural 
        Procedural Type Turbulence 
        Value 20% 
     
      Size 1 Km on all axis 

    Let's break this specularity texture down. We don't need any base specular value because Texture 1's image map is providing the 30% amount we need via the Opacity value. Texture 2 is an Alpha mask for the Gradient texture under it to keep the gradient effect confined to just the oceans. Texture 3's gradient adds to the specularity based on the angle that the camera sees the sun 'reflecting' off the water. We want the specularity to get very 'hot' when the sun's rays are glancing off the edge or horizon limb of the Earth yet diminish it to the value set by Texture 1's image map when the sun is 'over head' or behind the camera. This "fresnel" effect is created by the three keys listed to create the gradient and since specularity can go over 100%, values of 200% work well in simulating the same effects seen in real orbital photos. Texture 4 breaks up the "smooth" specularity with a touch of turbulent fractal noise to simulate the varying ocean current "textures." Because the ocean waves are so "microscopically" small at orbital altitudes, they effectively make the oceans equivalent to sandpaper... dull and diffuse... from straight above, but much more mirror-like towards the horizon.

  5. Set Glossiness to 40%,

  6. click on the Advanced tab, and set Diffuse Sharpness to 70%, which creates the sharp terminator shading from day to night.

Your Earth - Surface is done so Save your Earth-Surface.lwo object now.


TEXTURING THE EARTH'S CLOUDS

  1. Load into Layout the "Earth-Clouds.lwo" object.

  2. Open the Surface Editor and turn Smoothing and Double Sided On,

  3. Set up the Color Channel as follows:

    Color Base RGB
    255
    255
    255
      Texture Layer Type Procedural 
        Procedural Type Turbulence 
        Frequencies 7 
        Size 500 meters on all axis

    This creates more detailed cloud texture than what the transparency image map may produce. Placing it on the Color Channel instead of Diffuse allows you to adjust the Diffuse Channel without having to tweek a corresponding texture value as well. The default texture color of 200, 200, 200 gives a good contrast ratio.

  4. Set Diffuse to 80% to compensate for the brightening effect that the atmosphere object surface will have on it.

  5. Apply cloud image as a Sperical projection, Transparency image map on the Y axis. Be sure to check the Invert Layer check box since white in an image is transparent and we obviously don't want the clouds themselves to be transparent, just the black space between them.

  6. Set up the Bump Channel as follows:

    Bump Texture Layer Type Procedural 
        Procedural Type Turbulence, Dents, or Crumple 
        Value 10% 
     
      Frequencies 7 
        Size 300 meters on all axis

    This creates artificial cloud puffs that become visible closer to the day/night terminator. You can also add a second bump layer using the same cloud image to obtain cloud puffs that correspond to the cloud formations themselves. Doing so usually requires that the Bump Amplitude be set between 50% to 100% or more.

  7. On the Advanced tab, set Diffuse Sharpness to 70%, and finally, Save this object.

  8. Parent Earth-Clouds.lwo to Earth-Surface.lwo.


TEXTURING THE EARTH'S ATMOSPHERE

This is the more critical of the objects to be shaded as it is the item that does most of the work in creating the look we've come to expect a planet to look like from orbit, namely, the fuzzy limb (horizon curvature) as the atmosphere thins out to nothing and the gradient "bluing" of the horizon up to the limb.

  1. Load Earth-Atmosphere.lwo

  2. Open the Surface Editor, set Smoothing On for "Earth - Atmosphere," and set up the Color Channel as follows.

    (Note: All parameters not listed use their default values and all image maps have Pixel Blending On and Texture Antialiasing Off )

    Color Texture Layer Type Gradient    
      Input Incident Angle    
      Key 1
    0
    0
    0
       
    Parameter
    0 deg
       
      Key 2
    65
    125
    225
       
    Parameter
    10 deg
     
      Key 3
    140
    170
    215
       
    Parameter
    15 deg
     
      Key 4
    90
    110
    150
       
    Parameter
    18 deg
     
      Key 5
    0
    0
    0
       
    Parameter
    60 deg
     

    This color gradient based on incident angle with respect to the camera creates "part 1" of the atmosphere texture. Key 3's parameter of 15 degrees corresponds to the location on the edge of the atmosphere sphere that lines up with the hard edge of the surface sphere and applies only to this particular atmosphere to surface size ratio. It is a paler blue, the color being an average of several samples from real orbital images of this region. Keys 1 and 5 are black to help smooth out the transparency transition to the black of space for the limb and the transistion to fully transparent towards the center of the Earth.

    Transparency Texture Layer Type Gradient  
      Input Incident Angle  
      Key 1 Value
    120%
       
    Parameter
    0 deg
      Key 2 Value
    100%
       
    Parameter
    5 deg
      Key 3 Value
    0%
       
    Parameter
    15 deg
      Key 4 Value
    100%
       
    Parameter
    70 deg

    This transparency gradient based on incident angle with respect to the camera creates "part 2" of the atmosphere texture. Key 3's parameter of 15 degrees is at 0% transparent so that you don't see the hard edge of either the clouds or the surface objects. Instead, a smooth blend is achieved. Keys 1 and 2 are set and placed for optimum smoothness of transparency transition to space. Key 4's position creates the best transition width of the blue haze portion towards the center of the Earth.

  3. Click on the Advanced tab and set Additive Transparency to 40% and Diffuse Sharpness to 70%. Additive Transparency doesn't act the same as making the whole object somewhat transparent. Instead, the brighter the underlying surfaces, the less the overlying color "covers it up." The darker the underlying surfaces, the more opaque the overlying surface is. This just helps to keep the atmosphere layer from being totally opaque at the limb and covering over the cloud and specularity colors and intensities at the horizon. However, even though the atmosphere goes 100% transparent at around the 50-60 degree incident angle point, additive transparency still adds a measurable amount of brightening to the underlying surfaces, thus, as noted above, these underlying surfaces have their diffusity reduced to compensate.

  4. Set Object Dissolve in the Properties panel to 10% or as desired to reduce the overall intensity of the limb glow in cases where it is obviously too intense. This method eliminates the need to tweek the various transparency gradient key params to achieve the same look. Certain lighting conditions (angles of the sun to the Earth) tend to reduce the limb glow effect while others tend to enhance it (eg. setting/rising sun). Of course, there will be times, for instance, when simulating a setting or rising sun, that you'll have to add some sort of luminousity incident angle gradient to simulate the backlit illumination of the limb glow in addition to adjusting the colors for that deep red-orange to deep blue gradient. This is left up to you to create.

  5. Parent Earth-Atmosphere.lwo to Earth-Surface.lwo

Your Earth - Atmosphere is done, so Save your Earth-Atmosphere.lwo object now.

 


Example of how the three spheres are parented together.

SETTING UP YOUR SCENE

The default distant light makes for a good sun as is. All you have to do to it is:

  1. Turn Affect Specular Off,

  2. Rename the light to Sun Illum,

  3. Clone it.

  4. Rename this clone Sun Spec.

  5. Set the Color of this light to 250, 220, 180

  6. Turn Affect Diffuse Off and Affect Specular On.

  7. Set Ambient Intensity to 0%

  8. And finally, parent Sun Spec to Sun Illum.

Two lights are used so that we can seperate specularity and illumination attributes. Sun Spec's pale golden color creates the warm, yellowish ocean specular seen in real orbital photos, while not affecting the actual "white balance" of the scene. With the combination of the gradient specular texture on Earth - Surface, the specular becomes more intense as it approaches the horizon, again, a real-world effect that also varies depending on a myraid of other variables.

Save this scene as "Earth-Setup.lws" You can then do the Load From Scene thing to add this Earth to new space animations.

This concludes this tutorial. Thanks for following along. Email me if you encounter any missing, vague, or confusing information or if you just want to say it helped you in your LW shading skills.

Download the Objects, texture maps and scene here.

This tutorial has also been provided as a PDF file: Photoreal_Earth.pdf