Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 12 (modified by runom, 16 years ago) (diff)

Creating a Planet for Orxonox

This tutorial will show you how to create a planet with procedural textures for Orxonox.

1st Step

First we have to create an actual mesh for our planet. Most often people use UV-spheres for this purpose, however unsightly texture distortions occur, especially around the poles, because of the UV unwrap. Those distortions can be prevented by using a cube and moving the vertexes so that they lie on the surface of a sphere. That way there are only very minor distortions. Confused yet? Good. I'll show you now how to all that, step by step:

First start Blender and select the pre-created cube and press TAB to enter edit mode and choose all vertexes/edges/faces.
Next press CTRL + E and from the pop-up choose the option Mark seam.
You should end up with some like this:
Press F9 and TAB to get into edit mode. Click on Subdive in order to increase the vertex count, about 1538 vertexes should be enough
Next make sure that your space cursor lies in the origin. If not, just press SHIFT + C to reset it.
Click on To Sphere, make sure it's on 100 and press ok.
Now we need to resize the sphere's radius to 1 so that the scaling in-game works properly. Make sure the whole sphere is selected and press S. Scale it so it has a radius of 1.

2nd Step

Now, before we go any further, we'll create the texture.

Press F6 to get to the texture window. Add new adds a texture layer to your model (Make sure there exists a base material in the editor window (F9)).
There are a few procedurale texture algorithms available but most often Musgrave, Clouds and Noise work best. Here you are pretty much free to play around with the settings.
After setting up your algorithms, you need to assing a colour to them. Go to Material buttons (red orb) and click on Texture. Click on the texture you want to alter and click on Map to. Here you can choose the colour which you want to be assigned to the algorithm - just click on the coloured field. Proceed doing this for all your textures. You may want to assign a different colour to the gray background texture too.

Step 3

Now we'll unwrap our model, so we can then apply the texture according to UV coordinates.

Go to the UV/Image Editor. Press ALT + N to make a new image. Make sure the settings look something like this. Of course, you can make the texture bigger or smaller but multiples of a 3:2 aspect ratio work best and leave you with the least distortions.
Your UV/Image Editor should now show something like this:
Go back to the 3D View, switch to UV Face Select mode (only in Blender versions <2.46) , press U and click on Unwrap.
The model will be unwrapped and the result in the UV/Image Editor should look like this:
In order to get our texture into the game, we need to "bake" it, i.e. render the texture to an image. To do this, press F10 and Bake. In the bake menu, click on Textures and BAKE to bake it.
You'll hopefully end up with something like this in your UV/Image editor:
Press ALT + S to save the image. Make sure the filetype is set to Targa

4th Step

Exporting Meshes is explained properly in this wiki-article: https://www.orxonox.net/wiki/BlenderExport


You can download a template planet file here:

All you have to do is change the textures the way you want and bake them to a file.

Attachments (18)

Download all attachments as: .zip