Terrain in a Scene
Overview
Most 3D games and simulations happen on the ground: hills to climb, valleys to drive through, and flat land to build on. In 3D graphics this ground is called terrain. In this tutorial, you will add a terrain to a 3D scene in Quorum Studio, select it, read its properties, and look at the files Quorum Studio saves for it. Along the way you will see that a terrain is really a large set of numbers, one height for each point on the ground, split into square pieces called regions so that big worlds stay manageable.
Goals
By the end of this lesson, you can
- Add a terrain to a 3D scene, and select and delete it
- Understand that a terrain is height data split into regions
- Find a terrain's files in a project, and describe what each one holds
Warm up
Think of an outdoor place you know well, such as a park, a school field or a hill near your home. How would you describe its shape to someone who has never seen it, using only numbers? What would you measure, and how far apart would your measurements need to be?
Vocabulary
You will be learning about the following vocabulary words:
| Term | Definition |
|---|---|
| Terrain | The ground of a 3D world: hills, valleys and flat land, stored as heights. |
| Heightmap | A grid of numbers, one height for each point on the ground. Quorum stores each region's heightmap as an image. |
| Sample | One point on a heightmap, with its own height. |
| Region | One square piece of a terrain. Large terrains are made of many regions, so only some need to be loaded at once. |
| Sample spacing | The distance, in world units, between two neighboring samples. In code it is called the vertex spacing. |
| Origin | The point 0, 0, 0 in a scene. A terrain always stays there. |
CSTA Standards
For teachers · 2026 CSTA K–12 Computer Science Standards
Middle School · Data & Analysis
Evaluate how different levels of precision and granularity in data collection affect accuracy, storage, and analysis.
Also in 3 other lessons
Specialty I · X+CS
Model relationships within a non-CS discipline using data, visualizations, and computational methods.
Only this lesson so far
Explore
A terrain is the ground under a 3D scene. Instead of being one big model made by hand, it is stored as data: a grid of heights. Quorum measures the height of the ground at evenly spaced points, called samples, and draws a smooth surface through them. The closer together the samples are, the more detail the ground can have, and the more numbers there are to store.
Before you start
A terrain needs three things. If one is missing, Quorum Studio says why instead of adding it:
- Vulkan, the graphics system terrains are drawn with. Quorum Studio
must be running with Vulkan. Otherwise you hear
A terrain needs Vulkan, so it can't be added here.
- A project. A terrain's files are saved in the scene's project. A scene
opened on its own gives
A terrain is saved in the scene's project, but this scene isn't in a project.
- A 3D layer in the scene. Otherwise you hear
A terrain needs a 3D layer, and this scene has none.
If you have not made a scene yet, see Creating a Scene.
Adding a terrain
Terrain is in the palette, in the Basic 3D group, next to the cube,
sphere and other shapes. Its description, read by a screen reader, is
Ground for the scene, made of heightmap regions. It starts flat, 128 by
128 units.
There are two ways to add it:
- With the keyboard: move to Terrain in the palette and press Enter.
- With the mouse: drag Terrain into the scene and let go. The terrain is added only when you drop it; dragging over the scene and back off adds nothing.
Unlike other items, a terrain does not show a preview to place first. It is added at once, flat, at the origin. Quorum Studio saves its files straight away, selects it and says, for example:
Placed Terrain, flat, 128.0 by 128.0 units, saved in
Scenes/Terrains/Terrain1.
A new terrain is flat and plain. Later tutorials shape it, generate hills and mountains on it, and paint it with materials such as grass and rock.
A terrain stays at the origin
Other items can be moved, turned and scaled. A terrain can't. Its heights are positions in the world, and games use them to work out where the ground is, so it always stays at the origin. If you press a move, turn or scale key with a terrain selected, it stays where it is, and the first time you hear:
"A terrain stays at the origin. It can't be moved, turned or scaled."
Instead of moving a terrain, you move the other items onto it. A later tutorial, Shaping Terrain, shows how the move keys take on a new job once you choose a terrain tool.
Moving around a terrain with the keyboard
Everything you can do on a terrain with the mouse, you can also do with the keyboard. With nothing selected, the arrow keys move the scene editor's cursor, a small marker, around the 3D grid:
| Action | Windows | Mac |
|---|---|---|
| Move the cursor left or right | Left Arrow or Right Arrow | Left Arrow or Right Arrow |
| Move the cursor forward or back | Up Arrow or Down Arrow | Up Arrow or Down Arrow |
| Move the cursor up or down | Ctrl+Up Arrow or Ctrl+Down Arrow | Cmd+Up Arrow or Cmd+Down Arrow |
| Select what is at the cursor | Enter | Return |
| Go to the next item in the same spot | Tab | Tab |
| Leave the selection | Escape | Escape |
| Say where the cursor or the selected item is | Ctrl+Shift+1 | Ctrl+Shift+1 |
| Say which way the camera faces | Ctrl+Shift+2 | Ctrl+Shift+2 |
| Say how many items the camera can see | Ctrl+Shift+3 | Ctrl+Shift+3 |
When you let go of an arrow key, a screen reader says what is at the cursor's spot and where it is. To select the terrain, move the cursor down to ground level and press Enter. If something stands on the ground there, Tab moves between the items in that spot. With a terrain selected, the arrow keys don't move it, because a terrain stays at the origin. Once you choose a terrain tool, they move the tool's brush over the ground instead, as Shaping Terrain shows.
Moving the camera with the keyboard
The view of the scene comes from the scene editor's camera. With the mouse, hold the right button and drag to look around, hold the middle button and drag to orbit around a point, hold Shift and the middle button to pan, and use the scroll wheel to zoom.
With the keyboard, you move the camera by changing its properties:
- Press Alt+F (Option+F on Mac) to select the scene editor's camera.
- Press Ctrl+P (Cmd+P on Mac) to move into the Properties panel.
- The camera's section has its distance from the point it looks at, its direction as a yaw (turning left and right) and a pitch (looking up and down), its zoom, and its field of view. Tab to a field, type a new value, and press Enter.
- Press Escape to go back to the scene.
For example, changing the pitch tilts the camera to look further down at the terrain or further across it, and a larger distance shows more of it at once. With nothing selected, Ctrl+Shift+2 says which way the camera faces, so you can check it after each change. These keys work the same in every scene, terrain or not; the full list is on Navigation and Keys.
Selecting a terrain
You can select a terrain in three ways:
- from the scene tree, where it is listed once, by its name;
- by clicking the ground in the 3D view. If an item stands on the ground, such as a cube, clicking the item selects the item, not the ground;
- with the scene cursor: move the cursor to ground level and press Enter.
A selected terrain gets a thin border around its edges.
The Terrain section of the Properties panel
When a terrain is selected, the Properties panel on the right of the scene tab shows its sections. Press Cmd+P on Mac or Ctrl+P on Windows to move into the panel, Tab to move through it, and Escape to go back to the scene. (The panel is introduced in Properties.)
The first section is Terrain. It starts with the terrain's Name, which you can change. Below it is a line for each fact about the terrain. Tab stops on each line, so a screen reader reads it. For a new terrain they read:
- "Size: 128.0 by 128.0 units"
- "Regions: 4, each 64 by 64 samples"
- "Sample spacing: 1.0 units"
- "Ground height: 0.0 to 0.0"
- "Folder: Scenes/Terrains/Terrain1"
The ground height is the lowest and highest point on the terrain. It is 0 to 0 now because the terrain is flat. Watch it change when you shape the ground in Shaping Terrain.
The section ends with a button, Grow by one region on every side, which adds a ring of flat regions around the terrain. Regions are explained below.
After the Terrain section come four more:
- Materials, for the ground's look (Terrain Materials and Painting);
- Brush, for shaping it (Shaping Terrain);
- Generate, for making ground from rules (Generating Terrain);
- Physics, for how the terrain acts in a running game, such as whether things collide with it and how slippery it is (Terrain in a Game).
Regions
A large world could have millions of samples, so a terrain is split into square regions. Each region is a small grid of samples with its own heightmap file. A game can then load only the regions near the player, which keeps very big worlds manageable. A new terrain in Quorum Studio has four regions, two by two, each 64 by 64 samples, with the samples 1 unit apart. That makes it 128 by 128 units, with the origin in the middle.
Regions are numbered by where they sit. Region 0, 0 starts at the origin and covers the next 64 units along x and z; region -1, 0 is the one just before it along x, and so on. You can add regions to make the world bigger, or remove ones you don't need, with tools covered in Generating Terrain.
The files on disk
Quorum Studio keeps a scene's own files in the project's Scenes folder. Each
terrain gets a folder under Scenes/Terrains: the first is Terrain1, the
next Terrain2, and so on. A new terrain's folder holds:
terrain.json, a small text file describing the terrain;- one image for each region, named for the region's place in the grid of
regions:
region_-1_-1.png,region_-1_0.png,region_0_-1.pngandregion_0_0.png.
Open terrain.json in Quorum Studio. It is plain data, much like this:
{
"format": "TerrainData",
"version": 2,
"regionSize": 64,
"vertexSpacing": 1,
"regions": [
{ "x": -1, "z": -1, "lowest": 0, "highest": 0 },
{ "x": -1, "z": 0, "lowest": 0, "highest": 0 },
{ "x": 0, "z": -1, "lowest": 0, "highest": 0 },
{ "x": 0, "z": 0, "lowest": 0, "highest": 0 }
]
}
Each region's image holds its heights. Every pixel is one sample. Its color
is not a picture of the ground: the red, green and blue values together
store a number that says how far the sample's height is between the
region's lowest and highest heights, which terrain.json lists. That is
why an image of hilly ground can look like odd stripes of color.
The scene file itself, the .qs file, only refers to the terrain's
terrain.json, along with its name and its physics settings. Saving the
scene saves the terrain's files too.
Deleting, undoing and redoing
A terrain is deleted like any item: select it and press Delete or Backspace. Quorum Studio's Undo and Redo bring it back or remove it again. Deleting a terrain doesn't delete its folder. Quorum Studio never deletes files from a project when it saves, so the folder stays until you remove it.
Engage
In this activity, you and a partner make a terrain out of numbers and read each other's worlds from the numbers alone. The goal is to understand that a terrain is a grid of heights, which is exactly what Quorum stores. Each of you takes a piece of squared paper and marks out an area about 6 by 6 squares. In each square, write a height from 0 (a lake) to 9 (a mountain peak). Don't draw anything else: just numbers. Then swap papers. Using only the numbers, describe your partner's world out loud: where are the hills, the valleys and the flat places? Your partner then says what they imagined, and you compare.
Your paper is a heightmap, and each square is one sample, just like one point in a Quorum terrain. Together, discuss:
- What would change if the squares were twice as far apart? Half as far?
- If your world were 1,000 squares wide, how could you split it into pieces so a game only needs part of it at once?
- Write a short data dictionary for
terrain.json: for each field, its name, its type, and what values make sense.
Wrap up
A terrain is a set of heights, measured at evenly spaced samples and split
into square regions, each saved as its own image, with terrain.json to
describe them. What did you notice about the trade-off between detail and
the amount of data to store? In the next tutorial,
Terrain Materials and Painting,
you will give the ground its look: grass, rock, dirt and sand.