Introduction

In some cases, you may not want to use existing images to make your planet textures, or you may not wish to fumble around with layers and blend modes in GIMP or Photoshop. Thankfully, there is a fun method for creating planet textures that allows for complete control over just about every detail, from the size of coastlines to the color of your terrain.

In this tutorial, we will be taking a look at how to create procedurally generated planet textures using Blender and some camera tricks. The example planet texture below was created using material nodes, a simple sphere, and a camera to produce a texture with the correct polar warping so that it can be properly mapped to spheres.

Example Procedurally Generated Texture

By using material nodes in Blender, you can easily create procedural surface textures for your planet spheres, export your 3D models, and just stop right there if you like, but in this tutorial, we are going to look at how to set up your camera and materials so you can render a spherically mapped equirectangular texture that anyone can use to texture 3D spheres. Unfortunately, this method does not work to convert images into a spherically mapped equirectangular texture, but it can be used to create new textures for your planets.

Keep in mind, this tutorial is about making and rendering textures for 3D spheres, not for creating the 3D planets themselves, but the techniques outlined in the tutorial can be applied for the same purpose.

Blender: Preparing the Scene

The very first thing we want to do is set up our Blender scene. When you first open Blender, you will see the default cube mesh in the center of our scene. This cube is unnecessary, so press X to delete it from the scene. Now click on Add at the top of the window and select Mesh -> UV Sphere to create a new sphere.

Create UV Sphere

In the bottom left corner of the scene, you should see a small dialog box that allows you to input some initial settings when creating the UV Sphere. I usually increase the Segments and the Rings values so they are something closer to 96, but you can use whichever values you like. Just remember that the higher the number of segments and rings, the smoother the sphere will be. Now, right click on the sphere and select Shade Smooth so all the faces are smoothed out in the viewport.

We don’t actually need a light in the scene, unless you plan to do anything using lighting. For this tutorial, we want our final render to be exactly the same color that we see in the viewport, so I tend to remove the light from the scene. To do this, just select the Light object from the scene list on the right and press X to remove it. This should leave us with a nice simple scene containing nothing but a smooth sphere and a camera.

Prepared Sphere

For the first part of the tutorial, we are going to leave the camera alone so we can see what we are working on as we design the procedural surfaces using the material editor. This will allow us to make changes to our planet texture while still being able to rotate around the sphere and adjust things as needed.

Blender: Procedural Terrain

Most procedurally generated textures are made using a number of similar methods, such as blending random Noise and Gradients together, and the same holds true when making textures for planets. We will be using a few different types of Noise for our terrain generation, and blending a few different layers together using Gradients that we can adjust later to make different variations of our planet textures. The very first thing we need to do is create a material for our sphere by selecting the sphere in the scene and clicking on the Material Properties tab. Once the material properties tab is selected, click on +New to add a new material to the sphere.

Add New Material

This will add several nodes to the material editor, which you can switch to by clicking on Shading at the top of the viewport. You may also want to turn on Viewport Shading by selecting the solid sphere at the top right of the viewport, in order to see the texture as they would appear in a render.

Shading and Materials Editor

Right now, there is nothing to see if you switch Viewport Shading on since we don’t actually have any texture set up yet, but it can be helpful to turn on so you can see all the changes you are making. In the Shader editor section, click on Add -> Texture -> Noise Texture or type Noise Texture in the search bar to create a Noise Texture node. This will create the values that we want, but it won’t actually have any effect on the material until we give it some color, so click on Add -> Converter -> ColorRamp to create a gradient color ramp node. Connect the Factor output of the Noise Texture node to the Factor input of the ColorRamp node to connect them, and the ColorRamp’s Color ouput to the Base Color input of the BDSF node, as shown in the example below. 

Material Settings

By dragging the black part of the ColorRamp towards the right, you can adjust where the light and dark areas are in your material. I’m going to go ahead and set mine to right around the middle at 0.5 so there is an even amount of both light and dark.

Since we don’t have a light in the scene, everything might seem a bit dark while you’re working on it. To fix this, every time we change the final Color output, simply drag and connect a copy of the wire to the Emission input of the BDSF node and you should see a true color version of the material.

Connect Output to Emission

Only do this if you have already removed the light from your scene and you can’t see what you are working on. This can also be used to produce glowing effects on the planet surface, such as magma pools or city lights, but for now we are just going to use it to display a true color version of the material we are working on. By adjusting the values in the Noise Texture node, we can change the size or detail of our major landmasses. I’m going to go ahead and use the settings in the example image below, but feel free to experiment and find something you like.

Noise-Based Land Masses

You can also adjust the Scale value to increase or decrease the size of the landmass ‘blobs’ until you have something that looks closer to what you want. Another handy tip is to rename your nodes so you can keep track of which nodes are doing what. To do this, just right click on the node and select Rename. To add just a little bit more detail to the way the noise is generated, create another Noise Texture node, or simply duplicate the one we have already by selecting it and pressing Shift+D. Then connect its Color output to the Vector input of the first node.

Additional Noise Texture Node

Now that we have the basic structure of our terrain, in order to color it and make it look more like land and oceans, we need to create another ColorRamp node and connect it between the BDSF node and our existing ColorRamp. Connect the Color output of the first node to the Factor input of the new node.  If you are renaming your nodes, it might be helpful to change the name of the black and white ColorRamp to something like ‘Terrain/Ocean Ratio’ to keep things easier. Then change the name of the new ColorRamp node to something like ‘Terrain Color’ since we will be setting up the different colors of our elevation using this node. Click the + button several times to create a few new color zones in the new ‘Terrain Color’ node.

New ColorRamp Node

By changing the colors of each of the zones on the ColorRamp, you can control the overall appearance of the texture, such as the colors of the oceans, mountains, and coastlines. The black regions are going to be our oceans, so change the color furthest to the left from black to something closer to an ocean blue color. You can use whichever color you like for this, and we will probably be making more adjustments later. In the example image below, I’ve gone ahead and made a few changes to my ColorRamp to include some green shades for the land as well as some brown and yellows for the coastline.

Modified Color Ramp with Terrain Colors

That’s all there is to creating a simple procedural texture in Blender, but we don’t have to be finished just yet. In the next section of the tutorial, we will go over how to add some more detail to the material, such as ocean ripples or adding cloud layers to the texture. If you don’t need any additional details or don’t care about the reflectiveness of the material (which at this current stage does not affect the final texture output) then you can skip straight ahead to the Camera section of the tutorial to read about how to export the texture from this step.

Blender: Bumps and Clouds

Right now, our planet looks a bit flat all around. There is no real depth or dimension to the mountains or the coastlines, and it isn’t very realistic or interesting yet. Let’s add a little bit of bumpiness to our texture by adding a Bump node to our graph. We only need to connect the Normal output of the Bump node to the Normal input on the BDSF node. Then connect the Color ouput of the black and white ColorRamp to the Height input on the Bump node, as shown in the example image below.

Connected Bump Node

Immediately you will notice the terrain has been raised a bit, and the oceans remain flat. You can play around with the Distance value to increase or decrease the effect, though I’m going to set my Strength and Distance values to around 0.5. Now we just want to add one more ColorRamp node in between the black and white ColorRamp and our BDSF node so we can create a quick roughness map. This will allow for separation between the roughness of the terrain from the smooth oceans. Connect the original black and white ColorRamp node’s Color output to the new ColorRamp node’s Factor input, then connect the Color output of the new node to the Roughness input of the BDSF node, as in the example image below.

Connected Roughness ColorRamp

Set the slider to the left to a light gray color and add one more color to the ramp and set it to white. If you drag the white almost all the way over towards the left, it will separate the roughness of the land from the oceans. You can mess with the ColorRamp to get the appearance you like.

Now we are going to add a layer of clouds to our texture using yet another Noise Texture node. Add one to your graph along with another ColorRamp node. Connect the Factor output of the Noise Texture to the Factor input of the new ColorRamp. We are also going to need a MixRGB node, so add one and connect the Color output of the ColorRamp to the Color 1 input of the MixRGB node. Lastly, we need to connect the Color output of our Terrain Color ramp node to the Color 2 input of the MixRGB node. I am going to set the blend mode to Mix so the two inputs are combined.

Procedural Cloud Layer

By default, the Noise Texture settings will not look like clouds right out of the box, so you will have to play with the settings a little bit to get the desired appearance. I’ve gone ahead and bumped up the Distortion slightly to about 0.6, increased the Scale value to 6.9, set the Roughness to 0.742, and the Detail value to 4.5, which I think gives a pretty nice swirly cloud look. Be sure to connect the Color output of the MixRGB node to both the Color input and the Emission input of your BDSF node to see the full brightness of our texture.

Blender: Camera Setup

Now that we have a nice detailed procedural planet texture, all that remains is preparing our scene so we can render the texture that is now applied to our sphere. The setup for this is particularly simple, so this section will not be too long. The very first thing we need to do is make sure that our Render Engine is set to Cycles, and not Eevee. To do this, click on the Render Properties tab and change the Render Engine drop down menu to Cycles, if it isn’t already.

Cycles Render Engine

I’ve also gone ahead and changed the size of my render to something smaller than the default, since I don’t currently need huge textures. For this tutorial, I’m just going to change my render size to something like 512×256, but you can use whichever size you want for your project. Remember to use a 2:1 size that is twice as wide as it is tall, since we want the final image to be rectangular.

Render Resolution Settings

Select the camera that is currently in the scene and choose the Object Properties tab to bring up the position and rotation settings for the camera. Change the X, Y, and Z position of the camera to 0 so that it will be right in the center of the sphere. For the Rotation settings, simply set the X rotation to 90, and the Y and Z rotation to 0. This will point the camera outwards towards the equator of the sphere/planet.

Camera Position Settings

By default, the camera in our scene will be set to Perspective. Click on the Object Data Properties tab (this looks like a Camera icon) to bring up the camera properties. Change the Type from Perspective to Panorama and change the Panorama Type to Equirectangular. You should immediately see the viewport change to reflect the new camera properties. If you haven’t clicked on the Camera View Toggle button in the Viewport yet, you won’t see any change (I’ve circled the Camera View Toggle button with red in the example image below.)

Panoramic Camera Settings

Now when you go to render your scene, by selecting Render -> Render Image at the top of the window, instead of rendering the sphere, we get a render of the texture as it has been mapped on the sphere. The final texture is correctly stretched at the poles, which will appear perfectly with no pinching when used to texture a 3D sphere. Since the texture itself is procedural, you can go back to any step in your material graph and change settings to affect the final texture. This allows you to make all kinds of variations with different sized land masses, color schemes, and cloud layers.

Final Equirectangular Texture

There are a whole lot more things you can do to alter the texture, such as adding additional noise layers to increase the waves in the ocean, adding more color ramps to add snow to the poles or deserts around the equator, and even features like glowing lava. Don’t be too scared to experiment with different mixing modes, or feeding the output of one noise texture into the input of another, to produce different types of features for your textures.

*This tutorial will be expanded over time with additional techniques.