Log In | Register | Contact | Search


View Planet with Atmosphere

How to Create a Planet with Atmosphere

Overview:

This project is for newer users who want to create a nice looking 3D scene and learn about objects, textures, and lighting within Electric Image.
Creating a realistic (or stylized) Planet with Atmosphere in EI is a multi step process:
The planet, clouds, and atmosphere must be created (modeling step).
The models must be surfaced - a combination of object settings, material settings, and texture map settings (surfacing step).
The models must be lit (lighting step).

Having completed the above you will have a Planet with Atmosphere scene that you can merge with your asteroid scene, or your satellite scene, etc.

Finished Project: Download Planet Project

Modeling Steps:

Launch EI - create a NEW project file and call it something like - “Planet”. It’s a good idea to make a new Folder (with an appropriate name) to organize all the assets of this project (model files, texture maps, etc.). Save your new project.

A dialog box pops up asking you if you want to add a model file. Click ‘Cancel’. (Unless you already have a nicely meshed Sphere.fac model somewhere. If so, add that and then proceed.)

Into your EI project add an Ubershape - Sphere. Go to the ‘Plugin’ menu and and scroll down to ‘Uber Shape.plm’. Click to add an Uber Shape plug-in to your project. In the pop up ‘Uber Shape’ dialog box change the ‘Shape Type’ from the default ‘Plane’ to ‘Sphere’. We need lots of mesh resolution to create a smoothly curving planet, especially if you will be rendering close to the planet’s edge rather than far away in space. Increase the EI and Camera resolution from the default 18 (Latitude and Longitude) to 40. The number of Polygons status (lower left of the dialog box) should jump to 1600. For closer angles this will NOT be adequate. For a how to, we will leave it. Be sure to increase polygons as needed for your own project.

Click OK’ to accept. A sphere should appear in the World and Camera windows. From this humble ‘Uber Shape’ all will be created. Currently, our sphere is not yet camera ready. Plug-In geometry is recalculated on every frame and also resists some tricks we will perform upon it later when lighting. We need to export this model and re-import it.

Click on the ‘Sphere’ model to select it. From the ‘Object’ menu, scroll down to ‘Export Object’ and select ‘Native Fact’. Name your model (I called mine “sphere") and export it. A pop up dialog gives you some options, but for something this simple just accept the defaults and click ‘OK’.

Delete your Uber Shape sphere. (Don’t worry, we’ll bring the other model right back!)

From the ‘Object’ menu, select ‘Import Object’. Navigate to your exported sphere and select it. Note the options on the Import Object dialog box. The critical one here is ‘Smooth Shading Angle’. This is the angle between polygons where EI will shade the two faces as a smooth, continuous curve. 40 degrees is too shallow, and our planet will NOT appear smooth. Click and drag over the 40 degree number to select it and type in 89.9. This will cause all edges under 89.9 degrees to be smooth shaded. Those over (like the 90 degree right edges of a cube) will be hard shaded.

Click on ‘Open’ and the box will blink as the model is read in. Click ‘Done’ and the Sphere will reappear in the World and Camera windows. So far so good.

Save Your Project! (Always important).

Almost there. Select your newly added sphere.

From the ‘Window’ menu, scroll down and select ‘Project Window’. (Or press CMD/CTRL ‘l’—This is the most important hot key in EI!)

The Project Window appears showing your sphere highlighted (selected). Click on the Sphere again, and note that a white strip has appeared across the top of the Project Window (below the icons of various EI tools). The name ‘Sphere’ appears in this white data field. Click and drag over it to select, and type to rename your sphere. I called mine “Planet”.

Import your sphere model again. Be sure the Smooth Shading Angle is still set to 89.9 degrees. Rename this model “Clouds”.

Import the sphere again (getting tired yet?), and rename this one “Atmosphere.”

Double click on the ‘Clouds’ object in the Project Window. The ‘Clouds Info’ dialog box will pop up. Since we want the clouds to appear above the planet’s surface, this object should be a bit larger. In the section marked ‘Scale’ click on the ‘Auto Edit Y Z’ tick box. Now we can just enter an ‘X’ scale, and the other two (Y and Z) will follow. Click and drag over the X scale value of 1.0 and change it to 1.01 (after all, we need it just a bit larger). Hit enter to accept.

The Clouds object should expand slightly. Close the dialog box (click on the upper left Close control).

Double click on the ‘Atmosphere’ object in the Project Window. Just like before the ‘Info’ window opens. Change the scale of this object to 1.07. (Did you remember to enable Auto Edit Y Z? Good. We want this Atmosphere object to be larger than the others so we can make a soft, fuzzy edge later with our surfacing.

Close the ‘Info’ dialog box. Save your project.

At this point the modeling step is fairly well done. We could do a few extra things with normal flipping, but let’s save that for the lighting step.

Surfacing Steps:

We will need some texture maps for our planet’s surface and it’s cloud patterns. I got mine from this web site:

Planet Pixel Emporium

This was the first web site listed when I searched for “planetary images spherical maps”. This particular web site offers some low resolution maps available for free. If you need them, you can buy better quality maps here also. I downloaded JPEG files of the Earth, including a Color Map, Cloud Map, and Cloud Transparency Map.

Convert these JPEG’s to the EI Image format (.img). Typically I use Photoshop with Toby Thain’s conversion plug-in:

Telegraphics

JPEG’s might work, but Image format is better.

Before mapping actually starts, we could use a quick change to our lighting. Nothing too drastic, just a start to see how our maps will render.

Open the Project Window and double click on the ‘Light 1’ object to open it’s info window. (You can also double click on the Light Icon in the World or Camera views). On the upper left, change the default Light Type from Radial to Parallel. Click on the ‘Shadow’ tab to bring it forward and click on the ‘Enable Shadow’ tick box to set it. Leave the Shadow Type set at it’s default of ‘Buffer’. Close the Info box.

Click on the Light and drag it around in your scene. I chose the Top View Window to do this in, and swung my light slightly to the left.

Very good.

In the Project Window, note the Check Marks on the far left of the listed objects. These are Visibility Flags. Click on the check mark (Visibility Flags) for the Atmosphere and Cloud objects. The Flags vanish (uncheck) and the objects disappear from view, leaving us with the planet object.

We will start surfacing with this object.

Double click on the Planet object to open it’s Info box. Note the Sphere shaped Material Ball in the upper left. This is not a representation of our object, but it is one way to open the object’s surface or Material Properties. Click on the upper left sphere in the Planet Info box.

The Planet Material box should open. This is where we set basic and advanced surface properties for our planet.

Select the Diffuse Tab to bring the color and diffuse properties forward. Reduce the Diffuse Amount to 0.80. (Nothing is completely, 100% diffuse). Down below in the Diffuse Maps, click on the ADD button. A dialog box titled ‘Select Image/Shader File to Add:’ pops up. Navigate to the Earth color map and select it. (You did put all the converted images into an organized project folder, right? File structure is so important.)

The dialog box closes and now you can see your map loaded in the Diffuse Maps list. Double click on the map name, to open it’s Texture Info window. Here is where you will set the mapping parameters for this image. Click on the Tab marked ‘Projection’ to bring it forward. You should see an image of our mapped planet on the right. It doesn’t look so good right now. Let’s fix that. Under the ‘Map Type’ drop down, change the mapping method from the default ‘Flat’ to ‘Spherical’ (since we’re mapping a sphere!)

Much better. The other settings have been automatically placed for us by EI, and will work just fine here. Close the Texture Info dialog box.

Diffuse amount and color are now okay. Click on the ‘Specular’ tab to bring it forward. Lower the ‘Specular Amount’ all the way to 0. Something the size of a planet doesn’t need to be shiny.

That’s it for the Planet surfacing! Close out all the dialog boxes and if you like, find the icon that looks like a camera in the ‘Camera 1 View’ Window and click it. Scroll down to ‘Window Size’ and let go to render this view of your planet. When the thrill of 3D creation has settled down a bit, close this image window.

Open the Project Window again (remember CMD/CTRL ‘l’). Click on the Visibility Flag for the Planet object to turn it off. Click on the Visibility Flag for the Clouds object so we can begin surfacing it.

Double click on the Clouds object to bring up it’s Info window. Click on the Material Ball (yes there are direct ways to get to the object’s material properties, but we’ll stick with this for now). EI thoughtfully brings up the ‘Cloud Material’ box, with the Specular Tab already forward. (Since that was the tab we used previously.) Turn the Specular Amount all the way down to 0, Clouds aren’t shiny either.

Click on the Diffuse tab to bring it forward. Turn the Diffuse Amount down to 0.80. Same reason as before, nothing is 100% diffuse (ever). For the Diffuse Maps, you got it, click on the ADD button. Navigate to the Earth Cloud map and select it. Once it’s listed in the Diffuse Maps section, double click on the name to bring up the map properties. Again EI thoughtfully shows us the Projection tab (as that’s where we were working last). Change the Map Type from the default of ‘Flat’ to ‘Spherical’, and the clouds snap right to where we need them. Getting easier, as we’ve done this all before. Close the Diffuse Map property box.

Click on the Transparency tab to bring it forward. Here’s where we’ll apply a map to turn the Cloud object transparent so we can see the planet surface below. The map allows the white clouds to stand out, while the clear air turns, well, clear, transparent.

The Transparency Maps list is on the lower left of the dialog box. Click the ADD button and navigate to the Earth Cloud Transparency map. (arthcloudmaptrans.img) Select the map and then click Open to load it. Once again, double click on the map name and change the Map Type to Spherical. Getting easier all the time. Close the Map Info dialog box and using the Camera Icon on the “Camera 1” View Window, render out the scene.

Something’s wrong. The blue colored areas should be clear, and the clouds white. Our transparency map is inverted for our needs. No problem. Close the rendered image and from the transparency maps list, double click on the map name to open it’s Info box. Click on the ‘Filter’ tab to bring that forward. There is a setting marked ‘Invert’ which does exactly what you would think. Click on the tick box to invert the transparency map. Close the Transparency Map info window and re render.

Much better, white clouds. Close that Rendered image, and from the Project Window, turn the Visibility Flag for the Planet Object back on. Render again. Now we’re getting somewhere.

Turn off the Visibility Flags for the Planet and the Clouds. Next up, we surface the Atmosphere. Turn on the Visibility Flag for the Atmosphere object and double click it to bring up it’s Info box. While we have this box open, click on the ‘Shadow’ tab to bring it forward. Uncheck the tick box marked ‘Cast Shadow’, as it really isn’t needed for our transparent Atmosphere. On to surfacing.

Click on the Material Ball to bring up the Atmosphere’s Material Properties.

This one’s a bit special. Here we’ll do some tricky things to make the edge of the Atmosphere fuzzy and soft. Start by turning the Diffuse Amount down to 0.80. To the left of the Diffuse Amount is the Diffuse Color Swatch. Click on it to bring up the Color Picker. Select a nice Blue color. I choose the following H.S.V. values: H 203, S 82, and V 100.0. Anything you like will work (Mars would be orangish!) Click OK to accept this color.

Turn the Specular Amount to 0.

Transparency is where the magic happens. On the right side of the Transparency Tab are the Edge Settings. Increase the Edge Characteristic Amount (the first slider) to FULL. Set the number in the FallOff box to 0.2. Also, below are some radio buttons that tell EI how to process the edges of Transparent objects. Click on the Transparent button to set it.

The material ball in the upper left corner of the Material dialog box should now have a nice soft, fuzzy edge. Of course the middle is completely solid and will block the planet’s surface from view. We’ll fix that with some 3D trickery during the lighting step.

Close the Atmosphere Material dialog box, and SAVE your project.

Lighting Step:

Open the Project Window and click on the Light 1 object to select it. Click on the Menu Item marked ‘Edit’ and scroll down to ‘Duplicate’ to make a copy of our light. You could just press CMD/CTRL ‘d’ (another useful hotkey within EI).

Why two lights? As we noted during the surfacing step, the atmosphere object has a nice fuzzy edge, but the center is solid and will block the planet. One trick to get around this is to ‘Invert the Normals’, which means to turn the Atmosphere object’s polygons inside out. They will face inward, which alone does not help us, but we will also ‘Cull’ the back facing polygons, which turns them invisible. This actually does the trick.

Unfortunately, turning the normals to face inward also throws our lighting out of whack. We’ll fix that by creating two lights, one for the planet and clouds, and another for the atmosphere.

Rename one of our light objects to “Planet Clouds” and the other to “Atmosphere”.

Double click the ‘Atmosphere’ light object to bring up it’s Info dialog box. Click on the light’s ‘X-form’ tab (transformation) to bring it forward. Note the X, Y, and Z position of this light. Since we duplicated this from the original, the data will be the same, and we want the exact opposite. For each value (X, Y, Z) simply add a negative sign (-) in front of any positive numbers, and delete any negative signs to turn those values positive.

In the world view windows note that now our two lights are positioned exactly opposite of each other. Close the Atmosphere light’s info window.

Next we must tell each light to only illuminate certain items in the scene.

In the Project Window select the Planet and Cloud objects. Right click on these items and from the contextual menu that pops up scroll down to ‘Add to Selection Set...’ and choose ‘New Set’. A dialog box will pop up asking you to provide a name. I called mine “Planet Clouds”. Click ‘OK’ to accept. Right click on the Atmosphere object and again scroll to the menu item ‘Add to Selection Set...’ and choose ‘New Set’. I called this second selection set “Atmosphere.” Click ‘OK’ to accept.

Selection Sets are a very powerful tool within EI. They make organizing and working within your project much easier. Here, we will use selection sets to control which objects receive which type of illumination.

In the Project Window, double click on the ‘Planet Clouds’ light object to bring up it’s Info Dialog box. Click on the Properties tab to bring this forward. At the bottom is the ‘Illumination List’ section. Click on the ‘Add’ button and a dialog box showing the available Selection Sets will pop up. Since this is the Planet Clouds light, choose that set and click on Add, to add that set to the list. Also click on the Include radio button to set it. This way, the Planet and Clouds objects will by illuminated by that light.

Close the Planet and Clouds light info box.

In the Project Window, double click on the Atmosphere light object to open it’s Info dialog box. The Properties tab should already be forward. Again add a selection set to the Illumination list, this time the set called ‘Atmosphere’. Click on the Include radio button and close the dialog box.

Almost there.

In the Project Window, double click on the Atmosphere object to bring up it’s Info dialog box. Click on the ‘Shading’ tab to bring it forward. On the right side of this dialog box is a section marked ‘Geometry’. Click on the ‘Cull Backfaces’ and ‘Reverse Normals’ tick boxes check them.

That’s done it! Close all the dialog boxes and Save the project. Position your camera somewhere nice in the scene and render out an image. The atmosphere has a very nice rim glow to it, especially when the planet is half in shadow.

This project could be adjusted to taste of course. Some artists will prefer higher resolution texture maps, others will want minimal atmosphere glow. Right now, moving one of the lights means manually adjusting the position of the other, and rotating or positioning one of the objects could mess up the position of the others. Various nulls, hierarchies, and even Master Lights would make this project more adjustable, but for now, the basics work for your Planet with Atmosphere.

Thanks to the Igors and Ian Waters for assistance with the inverted normals lighting trick for planet atmospheres.