Terragen 2 landscapes

Terragen is a program that can create photorealistic landscapes on both the Mac and PC. The program is produced by PlanetSide which has graciously provided free versions of the program for educational and non-commercial use. There are actually two different versions of Terragen: Terragen 2 and Terragen Classic. In this tutorial, we will learn how to use Terragen 2 to create a photorealistic landscape.

When you first start Terragen, you will see several windows appear inside Terragen. At the top, you'll see a row of buttons: Objects, Terrain, Shaders, Water, Atmosphere, Lighting, Cameras, Renderers, and Node Network. By default, you'll start with the Terrain button selected, and the Terrain window appears on the left-hand side of the screen. On the top right of the screen you'll see a 3D preview window of the scene, while a diagram of the node network describing the scene appears on the bottom right. We won't be using the node network all that much in this tutorial, but it can sometimes be helpful when trying to fine-tune a Terragen model to adjust the parameters directly from the node network.

We're going to be using a fractal landscape in this tutorial, so we'll start by deleting the heightfield shader by clicking on the round green ball marked "Heightfield shader 01" at the upper left hand side of the screen and then hitting the delete key. Next, we'll add a fractal terrain by clicking on the "Add Terrain" button at the top left of the screen and selecting "Power Fractal". A fractal landscape, resembling a moonscape, should now fill the screen. Let's make this a mountain scene, so click on "Tweak Noise" and change the "Noise flavour" to "Perlin ridges". Adjust the camera view until you like the scene. To rotate the camera perspective, hold down both the Alt-key and left mouse button (Alt-LMB) and move the mouse. Alt-Ctrl-LMB will shift the camera perspective, and Alt-Shift-LMB will pan the camera back and forth. Adjust the camera perspective on the scene until you like the way it looks. Once you're happy with the camera perspective, click the button just below and to the left of the scene preview that shows a camera looking at a scene. This will set the render camera to be the current perspective camera. You can subsequently adjust the perspective camera, but the render camera will remain at its current position until you click on this button.

This is a pretty barren scene, but let's render it. Click on the "Renderers" button at the top of the screen, then click on "Quick Render" and then click on the "Render Image" button. You should soon see a fairly clean, but small, image of the scene.

We want to add some color to this scene. We'll start by adding some water to the scene. First, move the mouse around the scene and note the altitude (the "y" value) as you move around the scene. Make a rough estimate as to where you'd like the water level. In this particular scene, it looked like the water level would be about -100. Click on the "Water" button, then "Add Water Object" and select "Lake." Set the water level to -100 (or whatever value you think appropriate). The lake appears hashed in the 3D preview window, but is quite clear when you "Quick Render" the image.

This is still not a very interesting scene, so let's add some color. First, we'll add some dirt (or sand, depending on your preference). We'll place the dirt down low, near the edge of the water. To do this, click on the "Shaders" button at the top of the screen, then click the "Add layer" button, select "Color shader" then "Distribution shader."

The terrain will suddenly turn bright white, as if covered by snow. This is because the default shader color is white. Change this by clicking on the white color button to the right of the "Colour" slider.

A color selection window appears. Select a dark orange (brown) color for the dirt, or a dingy yellow for sand. The landscape should change from snow to dirt (or sand). Re-adjust the color if you don't like the appearance of the landscape. Now click on "Altitude constraints" click on both "Limit maximum Altitude" and "Use Y for altitude". Set the maximum altitude to be the same as the water level (-100 in my scene). Also, change the name "Distributtion shader v4 01" to something like "Dirt" or "sand" that will be easier to remember if you decide you want to change this setting later. You should now see dirt in your scene, but only near the level of the water.

Let's now add some grass to the scene. Like the dirt, click "Add Layer" then "Colour Shader" then "Distribution Shader". Once again, it will look like snow has covered everything in the scene. Change the name from "Distribution shader v4 01" to "Grass". Keep the color white for now, and change the "Altitude constraints." Check "Limit maximum altitude", "Limit minimum altitude" and "Use Y for altitude" boxes. Set the minimum altitude for about the water line (adjust until the grass gets close to the water line) and the maximum altitude for about 1/3 of the way up one of the farther mountains. Also, change the "fuzzy zones" from 200 to about 50. Also, click on "Slope constraints" and make sure that the "Limit maximum slope" box is checked. Limit the maximum slope angle to somewhere between 40 and 60 degrees. (The larger the slope angle, the more likely grass will cling to mountain sides.)

Now, we could make the grass a uniform green, but we can make a more realistic grass color by using a fractal color shader. Click on the "Add Child layer" then "Colour Shader" then "Power Fractal shader" to add a fractal color shader. Click on the "colour" tab, make sure both the "Apply high colour" and "Apply low colour" boxes are selected, then set the "high color" and "low color" to a dingy yellow-green and medium grassy green (or vice versa). Change the name of the color shader to "Grass Power fractal shader".

Repeat the same process for the grass, except this time we're going to name this shader "Trees". The bottom of the tree line should be near the top of the grass line, and the top of the tree line should be about one-half to two-thirds of the way to the top of the tall mountains. Also, the tree color will vary from dark green to very dark green (almost black). Make sure to check the "Use Y for altitude" button when setting the tree altitude constrains, and make sure that both the "Apply high colour" and "Apply low colour" buttons are selected in the Power fractal color shader.

Finally, add some snow to the top of the mountains. This is exactly the same as adding the dirt, except this time we'll keep the color white and we'll limit the minimum altitude to be close to the tops of the highest mountains. We'll also make the "fuzzy zone" larger (about 500) and check the "Fractal break-up" box. This will make the snow "fade out" as we move down the mountain, rather than abruptly ending at a fixed altitude.

If we now render this image, it is starting to look pretty good.

Let's add some more detail to the sky. Click on the "Atmosphere" button at the top and then click on the "Add Cloud Layer" button. I'll add some whispy high-altitude Cirrus clouds to the scene.

Finally, you can download some real trees into this scene. Download the free "Walli plant" package from Planetside (same place where you downloaded Terragen) and then click on the "Objects" button and then the "Add Objects" button. Select "Population" and then "Tgo reader." A file selection menu pops up. Find the folder containing Walli's plant pack, then find the pine trees and select "Pine01_2.tgo" as the object. This will create a forest of trees located at the point (0,0,0). We want to move the forest into the foreground. Right-click on a location in the foreground to copy the coordinates of the foreground into the clipboard, or else note the coordinates of a foreground position and enter them into the "Area centre" coordinates. Next, select the "Object scale" tab and change the minimum scale to 10 and maximum scale to 20 to make the trees somewhat bigger. Click on the "Distribution" tab and change the "Object spacing" to 100 and 100, and increase the spacing variation to 10 and 10. Click on the "Populate Now" button and you should see a large number of bounding boxes populate the preview window. Each of these bounding boxes will be replaced by a tree when you render the scene. You may want to shift the camera angle a bit if you find that there are too many trees blocking your view. Be sure to click the button to change the render camera to the preview camera once you have a good shot of your scene.

A full render of this scene now looks quite decent.

We can also change this to a sunset scene. Click on the "Lighting" button at the top of the screen, select "Sunlight 01" and change the heading of the sun to place it near the front of the scene. You can see where the sun is by looking at the yellow dot circling around the compass located at the top-left side of the preview window. Change the heading so that the sun is almost in front of the camera, then change the elevation to about 5 degrees or less. Check the "Do soft shadows" box. Click on the "Atmosphere" button at the top of the screen, then select "Atmosphere 01". Change the "Haze density" value to 2 and the "Redsky decay" value to 3. You should now have a nice sunset scene.