# Creating New Terrains with TerraForge 2

## Creating a Single Terrain

1. **Opening a Scene**
   * Open your Unity project and navigate to the desired scene where you want to create the terrain.
2. **Creating a Single Terrain**

   * Right-click in the Hierarchy window.
   * Select `Create TerraForge 2 > TerraForge Terrain`.

   <figure><img src="/files/WbvaomSoyEebLr1TzLd2" alt=""><figcaption></figcaption></figure>

   * A new terrain will appear in your scene with a default `TerrainData` and `TerraForgeTerrainGenerator` component attached.

   <figure><img src="/files/PkZmIwfO9v6l5Gkl5gr1" alt=""><figcaption></figcaption></figure>
3. **Configuring Terrain Parameters**
   * In the Inspector window, locate the `TerraForgeTerrainGenerator` component.
   * Adjust parameters such as terrain size, resolution, noise settings, and erosion simulation parameters according to your preferences.
4. **Setting Up TerrainPainter**
   1. Add the `TerrainPainter` component to the object via the Inspector.
   2. Add the Terrain to the Painter:
      * In the `TerrainPainter` component, click the `"Add terrain from this object"` button.
   3. Enable Auto Repaint:
      * Check the `"Auto Repaint"` option to ensure the terrain updates automatically whenever changes are made to the layers or settings.
   4. Configure Layers or Load a Preset:

      * To customize layers, manually adjust the settings in the Layers section of the `TerrainPainter` component.
      * Alternatively, apply a preset from the preconfigured options by loading one from the following directory:\
        `Assets/TerraForge 2/Demo/Profiles/Terrain Painter LayerSettingsData Presets`.

      [Learn more about working with the TerrainPainter component](/terraforge-documentation/how-it-works/terrain-painter.md)
5. **Generating the Terrain**

   * Within the `TerraForgeTerrainGenerator` component window, click on `Generate Terrain`.
   * TerraForge 2 will procedurally generate the terrain based on your configured settings.

   <figure><img src="/files/gDFT4Uk8w4WJXkdgLHCy" alt=""><figcaption></figcaption></figure>

The video tutorial below shows a snippet of creating new terrains and genertion:

{% embed url="<https://youtu.be/opPbNl-yE14>" %}

***

## Creating a Grid of Terrains

1. **Preparing Biomes**
   * Biomes in TerraForge 2 play a crucial role in creating diverse and realistic terrains. Unlike traditional terrain generation methods that use static templates or pre-made stamps, TerraForge 2 employs biomes to define the procedural rules for terrain formation. Each biome encapsulates specific noise and erosion settings, which dictate the topographical features of the terrain, such as hills, valleys, mountains, and plains. When creating a grid of terrains, biomes ensure that each terrain cell can have distinct features, enhancing the visual diversity and realism of large terrain areas.
   * Select `Create > TerraForge 2 > BiomeSettings` to create a new biome settings file.
   * Configure biome settings such as noise and erosion settings. If you want, you can preview the biome settings and see how they affect the terrain.
   * You can also use the pre-configured biomes from the TerraForge 2 demo.
2. **Creating a Terrain Grid**

   * Open your scene or create a new scene where you want to place the terrain grid.
   * Right-click in the Hierarchy window.
   * Select `Create TerraForge 2 > TerraForge Terrains Grid`.
   * A new game object will appear in your scene with a default `TerraForgeTerrainsGridGenerator` component attached.

   <figure><img src="/files/UQILB9it7EIItVdzHAQB" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/tXTxhJeFQ7j5cLCuUThp" alt=""><figcaption></figcaption></figure>
3. **Assigning Biomes**

   * In the Inspector window, locate the `TerraForgeTerrainsGridGenerator` component of the `TerraForge Terrains Grid` game object.
   * Ensure the `Biomes` array in the `TerraForgeTerrainsGridGenerator` is populated with the biomes you created earlier.

   <figure><img src="/files/356gSouMHhiplL8aMAst" alt=""><figcaption></figcaption></figure>
4. **Generating the Terrain Grid**

   * Within the `TerraForgeTerrainsGridGenerator` component window, configure grid generation parameters such as grid size, blending parameters, etc.
   * Click on `Generate New Grid` to initiate the generation process.
   * TerraForge 2 will procedurally generate a grid of terrains, with each terrain using randomly selected biomes from the assigned `Biomes` array.
   * Once the generation process is complete, you will have a new grid of terrains in your scene, seamlessly connected at the edges.

   <figure><img src="/files/U7sM5wgUCmrSXaLoCvJ7" alt=""><figcaption></figcaption></figure>
5. **Setting Up TerrainPainter**
   1. Attach the `TerrainPainter` component to the object with the `TerraForgeTerrainsGridGenerator` component via the Inspector.
   2. Add the Terrains to the Painter:
      * In the `TerrainPainter` component, click the `"Assign child terrains"` button.
   3. **E**nable Auto Repaint:
      * Check the `"Auto Repaint"` option to ensure the terrains updates automatically whenever changes are made to the layers or settings.
   4. Configure Layers or Load a Preset:

      * To customize layers, manually adjust the settings in the Layers section of the `TerrainPainter` component.
      * Alternatively, apply a preset from the preconfigured options by loading one from the following directory:\
        `Assets/TerraForge 2/Demo/Profiles/Terrain Painter LayerSettingsData Presets`.

      [Learn more about working with the TerrainPainter component](/terraforge-documentation/how-it-works/terrain-painter.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiskered.gitbook.io/terraforge-documentation/getting-started/creating-new-terrains-with-terraforge-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
