> For the complete documentation index, see [llms.txt](https://wiskered.gitbook.io/terraforge-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiskered.gitbook.io/terraforge-documentation/how-it-works/biomes-settings.md).

# Biomes Settings

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.

***

## **How to Use**

1. **Create Biome Settings Asset**: Right-click in the Project window and select `Create > TerraForge 2 > Biome Settings`. This action creates a new `BiomeSettings` asset in your specified directory.

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

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

2. **Configuring a New Biome:** To set up a new biome, first select the newly created biome file in the Project window. This will open the biome settings in the Inspector window, where you can customize it according to your requirements. Adjust the Biome Name to identify the biome, set the Terrain Height to define the elevation characteristics, and configure the Terrain Layers. Additionally, modify the Hydraulic Erosion Layer Settings to control erosion effects.

<div align="center"><figure><img src="/files/GVEN2LT9EweJ3FhczNGZ" alt=""><figcaption></figcaption></figure> <figure><img src="/files/ghE4ueME7y2MqorS21v8" alt=""><figcaption></figcaption></figure></div>

3. **Previewing Biome:** To open a preview of how the biome affects terrain generation, select the biome file in the Project window and then click the **`Show Preview Biome`** button in the Inspector window. This action will open a special terrain prefab to view the biome, applying biome settings such as terrain height, terrain layers, and hydraulic erosion settings to the `TerraForge Terrain Generator` component. The preview will be displayed within the Unity Editor, allowing you to see a real-time representation of the biome's impact on the terrain. You can also change the generation parameters in preview mode and then save them to the same biome using the `Apply the changes to Biome` button in the inspector window.

<figure><img src="/files/0C7iz9R0xVlRcGbbVopy" alt="" width="563"><figcaption></figcaption></figure>

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

4. **Applying Biome Settings:** After configuring and previewing your biome, you can use it within the [`TerraForgeTerrainsGridGenerator`](/terraforge-documentation/how-it-works/terrains-grid-generator.md) component. The biome settings can be applied to the [`TerraForgeTerrainsGenerator`](/terraforge-documentation/how-it-works/terrain-generator.md) component via the [`Load Biome Settings Window`](/terraforge-documentation/how-it-works/load-biome-settings.md). This allows for the procedural generation of diverse and realistic terrains based on the rules defined in your custom biome settings.

***

## Quick Script Overview

* **`ApplyingBiomeSettings`**: Applies the settings to a `TerraForgeTerrainGenerator` and updates the terrain game object accordingly.
* **`ShowPreviewBiome`**: Instantiates a preview of the biome using a prefab and applies the biome settings for visual inspection.
* **`ClosePrefabView`**: Closes the currently open prefab view if any.

**BiomeSettingsEditor Script:**

**`BiomeSettingsEditor.cs`**\
Provides a custom editor for the `BiomeSettings` class in Unity. It allows users to configure biome properties through a user-friendly interface.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://wiskered.gitbook.io/terraforge-documentation/how-it-works/biomes-settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
