There are several other ways to create good looking terrains. In this section of the tutorial, we are going learn them.
Heightmap are grayscale images that represents height. It gets higher from black to white; pure white being the highest point and pure black being the lower point of the terrain. They generally look smiliar to this:
There are several ways to create heightmaps. You can either hand-paint them in your image-editing program, or create them by using a 3rd party terrain creation application. If you search in the internet you will find alot of diffrent terrain creation applications. Most will allow you to get a greyscale heightmap like the one above.
Creating a terrain from a heightmap with MED is quite easy. Just go to File->Import->Terrain from Image and open your heightmap. You will see a settings windows smiliar to the one we used to create terrains from scratch. Choose the settings as you desire and click OK. Here is the screenshot of the terrain created from the hieghtmap above:
The problem that you might encounter at this point is most likely ending up having a terrain like these:
A terrain way too flat or steep. If your terrain is too flat, either your heightmap is prepared like that or you made your triangles very large, try to select lower values for triangle sizes on import window. If they are already small values use fewer vertices. If it's too steep, then either you dont have enough vertices or your triangles are too small, either make triangles larger or use more vertices.
GED is the newest tool of Gamestudio that allows you to edit your levels in realtime. You will see results immediately at the time of editing, and will see it as exactly as it will look in the game. This tutorial won't cover how to use GED, this part of the tutorial is for letting you know that you can edit terrains with GED.
Anyway, run the GED and go to Object->Add Terrain. Select your terrain or made a flat one with MED and select that one. Click on where you want to place the terrain. Select your terrain and click on the Edit terrain mode tool. Right hand panel of the GED will show you terrain tools.
In deform tab, you can generate random heightmaps, smooth out your heightmap, Deform or smooth spesific parts of the terrain with a tool smiliar to MED's terrain tool. You can shoose brush type, radius,strength and other propersties and edit your terrain by clicking on it. Only diffrence is that you have to use alt+click to lower the terrain and not right mouse click. Also, you can directly paint on heightmap on Gen. Heightmap mode, but first, you have to enable this feature by going to File->Preferences and activating Enable heightmap paint.
If you switch to paint tab GED will ask you to switch to default multi-texture terrain shader. Unfortunately you need to have Commercial version or above to use shaders. If you have Commercial or Pro version, make sure you setup your script propelry and mtlFx.c is included in your script. For more info about including scripts refer to lite-c workshops. And click ok when it asks you to switch to default multitexture terrain shader.
Add 4 skins to your terrain, first one being your base texture. Then you can select and paint textures on your terrain with the brush.
Terrain section of this tutorial is finished. You now have general knowledge about terrains and how to create them. If you also completed the WED tutorial, it means you have enough knowledge to start creating good looking levels with Gamestudio! Share your results with us at Projects forum, you can get comments and critiques about your levels and make them better!