Terragen Workflow

The various maps for use with the TerrainTools can be created in various ways. One possible way is to use the rendering abilities of Terragen 2.


Start with any terrain you like. It can be a heightfield or an entirely procedural terrain. This gives you the option of starting with a designed layout, for example by using L3DT and its "design map" feature to draw a rough outline of your terrain.

One way or the other, have a terrain loaded up.

Now set up a camera for all your renderings. This must be an orthographic camera, with a -90/0/0 rotation. Disable shadows, set the sunlight to a 90 elevation (i.e. straight up) and voila, you've got your top-down camera.


My method is described here: http://forums.planetside.co.uk/index.php?topic=7223.0

Note that heightmaps must be x^2+1, e.g. 513, 1025, etc.

Save as .exr and convert into .raw in Photoshop or whatever else you use. Make sure to save as a non-interleaved file, and that your byte-ordering is identical in Photoshop and Unity (i.e. if you save as Mac, you need to import as Mac, if you save as PC, import as PC).


Now set up surface shaders in four colours: Red, Green, Blue and Black. Set them up in whatever way you want your texture covering. I usually have one for strong slopes where rock should show through, and the others for features, heights or just random/fractale distribution. But use whatever you want.

One thing to keep in mind is that ‘‘Surface Layers'‘ do not blend in TG2. That means you have clearly defined textures. If you want them to smoothly blend not only into each other at the edges, but also within the areas (which if done right can give you great visual effects and make people believe you used a lot more different textures than you did), use shader overlays (i.e. no "apply low colour") or functions (e.g. "add color").

Then render from the same camera as your heightmap, this guarantees that heightfield and splatmap fit together.
Remember that you need x^2^ here, e.g. 512, 1024, etc.

Tree-, Grass- and Bushmaps

These follow the same basic principle as the splatmaps — set up shaders so that they display in primary colours where you want each tree/grass/bush type to be, use blending or additive mixing for areas where you want multiple types (e.g. white/gray = all types equally).

One difference is that "black" means "no trees/grass/bushes". On almost every map you will have areas without vegetation. Use a simple powerfractal blendshader to accomplish a "scattered woods" or "grass areas" effect. Reduce coverage to thin out vegetation equally.


This is a ton easier than it appears to be. Simply add a surface layer where you exclude areas you don't want spawns to occur on. This will usually be steep slopes, but you can use it to exclude water areas. If your waterline is at 100, simply set a minimum altitude of 100 (or 120 with 20 soft zone, whatever suits you).

In addition, you can use a spherical distance shader as a blendshader to restrict spawn areas to the middle of the map, or at least exclude the very edges. Since you will usually have barriers or borders there, that makes a lot of sense.

For the colour, simply give it a white colour. In the spawnmap, white (or gray) means "spawn possible" and black means "don't spawn here". You can use grayscales if you want different spawning probabilities.


Usually, you'll draw these in a painting program.