Create an Environment with Terrain

*เนื้อหานี้จะพร้อมใช้งานในภาษาที่คุณเลือกในเร็วๆ นี้


Creating an environment with terrain allows you to generate and customize organic materials within the 3D space that look and behave like natural materials from the real world. Using tools within the Terrain Editor, this section of the tutorial teaches you how to generate and sculpt terrain for a small island where players spawn and navigate to the first few platforms of your experience.

Before you begin, it's important to note that sculpting terrain is an art form, and it's difficult to exactly recreate brush strokes and subtle material edits. As long as your terrain meets the needs of your own experience, it's normal and expected for your environment to look and feel different from the sample Island Jump experience.

Create the Island

The first step in creating your environment is to create a small island that players will spawn to when they start the experience, and when their health reaches zero after they fall off a platform. Using the Terrain Editor's Draw tool, you can click and drag anywhere within the viewport to generate a large sphere of terrain to start the island, which you can later shape and flatten for a wide surface area.

To create the island:

  1. In the menu bar, navigate to the Home tab, then click the Terrain Editor button. The Terrain Editor window displays.

    Studio's Home tab with the Terrain Editor tool highlighted.
  2. In the Terrain Editor window, click the Edit tab, then the Draw button.

    Studio's Terrain Editor window with both the Edit tab and Draw button highlighted.
  3. In the Brush Settings and Material Settings sections, keep all default setting except for the following:

    Studio's Draw tool settings for this step in the task. The Brush Mode's Add button is highlighted.
    • Set Brush Size to 32.
    • Set Source Material to Sand.
  4. In the viewport, click near the spawn location in the viewport. A sphere of sand material displays.

Shape the Island

If you keep the island in its current shape, players would have a difficult time navigating without falling off the island. Using the Terrain Editor's Flatten tool, you can click and drag on the sphere to evenly level the terrain on a fixed plane, and provide players a relatively flat surface as they start your experience. While this shape initially looks unnatural, you can also use the Terrain Editor's Sculpt tool around the edges of the island to ensure it looks organic and realistic.

To shape the island:

  1. In the Terrain Editor window, click the Flatten button.

    Studio's Terrain Editor window with both the Edit tab and Flatten button highlighted.
  2. In the Brush Settings section, keep all default setting except for the following:

    Studio's Flatten tool settings for this step in the task.
    • Set Brush Size to 18.
    • Set Flatten Plane to Fixed. New settings display.
    • Set Fixed Y Plane to 0.
  3. In the viewport, click and drag your mouse around the sphere until it's completely flat on top.

  4. Navigate back to the Terrain Editor window, then click the Sculpt button.

    Studio's Terrain Editor window with both the Edit tab and Sculpt button highlighted.
  5. In the Brush Settings and Material Settings sections, set Source Material to Sand, otherwise keep all default settings.

    Studio's Sculpt tool settings for this step in the task. The Brush Mode's Add button highlighted.
  6. In the viewport, click and drag your mouse around the island's edges and below the water line to make the island look more natural.

Create Water

While there are multiple ways to generate a large body of water, the following instructions utilize the Terrain Editor's Fill tool. This method allows you to replace any material in a specific region with another material, including air itself.

To create the water around the island:

  1. In the Terrain Editor window, click the Fill button.

    Studio's Terrain Editor window with both the Edit tab and Fill button highlighted.
  2. In the Selection Settings section,

    1. Set Position to 0, -15, 0 to ensure the water fills below the top of the island.
    2. Set Size to 1800, 5, 1800 to ensure the water fills toward the horizon of your experience.
  3. In the Material Settings section, configure the tool with the following settings:

    Studio's Fill tool material settings for this step in the task. The Material Mode's Replace button, source material, and target material are highlighted.
    • Set Fill Mode to Replace.
    • Set Source Material to Air.
    • Set Target Material to Water.
  4. Click the Apply button. Water generates around the island.

Apply Materials

Now that you have the basis of your island, you can customize its appearance with different materials. Using the Terrain Editor's Paint tool, you can click and drag on your terrain to apply both a grassy surface and blades of grass to the middle of the island's surface.

To apply materials to the island:

  1. In the Terrain Editor, click the Paint button.

    Studio's Terrain Editor window with both the Edit tab and Paint button highlighted.
  2. In the Brush Settings and Material Settings sections, keep all default setting except for the following:

    Studio's Paint tool settings for this step in the task. The material is highlighted.
    • Set Material Mode to Paint.
    • Set Source Material to Leafy Grass.
  3. In the viewport, click and drag around the middle of the island to apply the leafy grass material.

  4. Navigate back to the Terrain Editor window, then in the Brush Settings and Material Settings sections,

    1. Set Brush Size to 3.
    2. Set Material to Grass.
  5. In the viewport, drag along the edges of the island to apply blades of grass, leaving space in the middle of the island for the spawn location and the initial platforms.

  6. In the Explorer window, select the SpawnLocation object.

  7. In the Home tab, select the Move tool.

  8. In the viewport, move the spawn location toward the edge of the island to make space for the first platform. The sample Island Jump - Building .rbxl file uses a position of -127, -3, 9.

Playtest

Once you are happy with your island's appearance, you can playtest your experience to check the scale of the island and how it feels in the context of your experience's 3D world.

To playtest your experience:

  1. In the menu bar, click the Play button. Studio enters playtest mode.

    Studio's Home tab with the Play button highlighted in the menu bar.
  2. Walk around the island and check out how it looks while playing. When you're done, navigate back to the menu bar and click the Stop button. Studio exits playtest mode.

    Studio's Home tab with the Stop button highlighted in the menu bar.

In the next section of the tutorial, you will learn how to create a playable area for players to follow in order to reach the highest platform.