Blender provides a great possibility for creating procedural textures and materials. In particular, in Blender, we can create interesting procedural textures for planets. However, Blender’s node system is not compatible with third-party renders and game engines, and procedurally generated textures need to be baked into an image.
Usually, to apply image textures to a spherical object, in our case, on a planet, the Equirectangular projection is used.
For example, we have created the procedural texture of the Martian-like planet.
Now let’s bake it to an image file.
To render a texture into a file, we need to use the Cycles render engine, since it only has the camera type we need.
Add a camera to the center of our planet sphere (shift + a – Camera). Align it horizontally with the planet and set the following parameters for it:
- Set the Focal Length to 5 mm.
- Set the camera type to Panoramic.
- Set the Panorama Type to Equirectangualr.
The render resolution must be set to a ratio of 2 to 1 horizontally. In our case, let’s set the vertical size of the render (by the Y axis) to 1024. So the horizontal size (by the X axis) should be 2 times larger – 2048.
If we try to start render, we will get a black image as a result. This happens because we are rendering our planet “from the inside”, where there is no light sources. In order for the camera to see the texture, it needs to be highlighted.
Add a point light source to the center of the sphere (shift + a – Light – Point). Such a light source illuminates everything around it evenly. The power of the light source must be adjusted depending on the size of our sphere-planet.
Now, let’s start render by pressing the F12 key.
As a result, we got an image in the desired projection, which remains only to be saved to a file by pressing the alt + s keys.
To test the texture we created, let’s add another sphere in the same scene in Blender and apply the created texture to it in the usual way using the Environment Texture node.
As we can see, there are no distortions in the texture pattern, everything looks the same as in the procedural version.