Creating a Terrain Object

Now let’s populate our game work with some terrain, trees, water and more. We will start by creating a terrain object. In the Create panel select the Terrain icon.

CopperCube 6 - Creating a Terrain Object

You can accomplish the same thing by right-clicking the viewport or selecting the root of the scene in the SceneGraph explorer and select Insert->Create terrain.

CopperCube - Create Terrain

This will display a Create Terrain dialog window:

CopperCube - Create Terrain

There are several different things you can control here, decorations will result in grass and trees being populated in your game world. Side Length determines the size of your terrain along each axis, while Tile Size determines the density of the generated terrain. Textures enable you to specify the texture used at ground level, mid-level, and at high points of the terrain, but we will stick with the defaults for now. Under Topology, you can determine what the highest point in your created terrain while Topology describes how the three different options, hills, deserts, and flat options. Click OK and your terrain object will be created.

CopperCube Topology

Notice the Terrain Editing window? This contains the options available for editing your newly created terrain object. We will go through each of them shortly. Notice in the SceneView that in addition to a terrain object, several tree meshes were also created:

CopperCube Terrain Editing

You can select each individual tree, deleting, or moving them as you see fit. Notice how the trees appear below the Terrain in the list? This is because they are children of the Terrain. This is handy because if you move the parent, all of the children will move as well.

Now let’s take a look at the different editing options. The first one is selection, that should be obvious enough. The next icon:

CopperCube Painting Textures

Is for painting textures. With this selected, choose a texture from the texture window, the selected tile will be tinted:

CopperCube - Choose a Texture

Now you can paint textures in the viewport.

CopperCube Terrain Paint Texture

Now left-click and it will replace the texture in the selected area.

The next icon:

Clipboard-Image_45

Can be used to raise and lower the terrain below the brush.

CopperCube Terrain Resize

Click and drag left to lower, drag right to raise.

You can go one step further tweaking high elevation(which will also change the texture between Ground, Middle, and High as it goes up and down) using the Mountain/Valley tool

CopperCube Mountain/Valley Tool

This works almost identically to the Raise/Lower tool:

CopperCube Terrain Mountain

Left-click to change elevation, move the mouse up and down instead of left and right. Up to increase height to a hill, down to create a valley.

Next is the smooth tool.

CopperCube Smooth Tool

This simply smooths out edges and can be used to make less sharp edges.

CopperCube Terrain_Smooth

This one is pretty straight forward, left-click over a surface and it will be smoothed out over time.

Next up we have the flatten tool

CopperCube Flatten Tool

This tool works like smooth, but instead of rounding down edges, this one just straight out pushes the surface down evenly, attempting to flatten the surface.

CopperCube Terrain Flatten

Next up is the noise tool:

CopperCube Noise Tool

This can be thought of as a way to randomize the surface.

CopperCube Terrain Noise

Finally we have the grass tool.

CopperCube Grass Tool

This one can be used to draw grass sprites on the terrain:

CopperCube Terrain Grass

You can control the size of the painted grass using these two boxes:

CopperCube Painted Grass

You can also hold down the shift key while painting to erase the grass under the brush on the terrain.

Using this combination of tools you can create just about any kind of terrain for your game. One thing that is noticeably lacking is water.

Creating Water

So, let’s look at how you can add some water to your game level. In the Create panel, select a water object:

Clipboard-Image_52

Or right click and select Insert->Create A Water Surface. You will then be shown the following dialog:

Clipboard-Image_53

This controls the size of the created water while tile count determines the mesh density. Size similar to the terrain object, or simply chose the defaults. Now simply position your water above your terrain so some surfaces are above water and some are below, like so:

Clipboard-Image_54

There are a number of different properties you can set for water such as how high waves should be, the color and transparency effect when the camera is below water, the direction water should flow, etc.

Clipboard-Image_55

Scroll to Top