> For the complete documentation index, see [llms.txt](https://amazing-assets.gitbook.io/terrain-to-obj/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amazing-assets.gitbook.io/terrain-to-obj/how-to-use.md).

# How To Use

For converting terrain into a **OBJ** mesh open **Terrain To OBJ** editor window from the <mark style="color:blue;">**Unity Main Toolbar**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">→</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**Window**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">→</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**Amazing Assets**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">→</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**Terrain To OBJ**</mark> and drag & drop any terrain assets from the **Hierarchy** or **Project** windows here. Source terrains will be displayed in the conversion list with information about their resources usage:

<div data-full-width="false"><figure><img src="/files/4aG6YJAndaPZUpJl7Gsb" alt="" width="563"><figcaption></figcaption></figure></div>

To ensure that conversion settings are set to default, it is advisable to reset them after opening editor window from the mouse right click context menu:

<figure><img src="/files/0Aikr98hvqrXOGridoFd" alt=""><figcaption></figcaption></figure>

After setting desired conversion settings, click on the <mark style="background-color:yellow;">**Run**</mark> button at the bottom of the window. This will convert all terrains in the list to OBJ format meshes and save them in the selected location, inside or outside of the project.

### Editor Window Settings

**Vertices** - Controls generated mesh vertex count horizontally and vertically:

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

<figure><img src="/files/l2kOQzbHhVDKh2iZrNU6" alt=""><figcaption><p>Quality of the exported mesh depends on the vertex count</p></figcaption></figure>

![](/files/RfjffZMPX1vMfWccvsha) Choosing **Resolution** option instead of **Vertices**, calculates vertex count horizontally and  vertically in the way that vertex 2D grid always has quad shape. In this case final mesh vertex count depends on the source terrain length & width sizes and is displayed in the terrains list section:

<figure><img src="/files/40MrhP2sHzPG8jWWiji1" alt="" width="563"><figcaption></figcaption></figure>

**Normals** - Calculates and saves *<mark style="color:blue;">normals</mark>* for OBJ file. If generated OBJ file has no *<mark style="color:blue;">normals</mark>*, Unity (and any other 3d modeling software) calculates them manually after importing a mesh.\
Reduces generated file size if is disabled, but may create visible seams on the chunks edges.

\
**Chunks** - Splits converted terrain into multiple pieces, defined by Horizontal and Vertical count properties.

\
**Per Chunk UV** - Defines UV layout for chunks. If enabled, all sub-meshes will have individual UVs in the range of \[0, 1]. Otherwise one UV layout in the range of \[0, 1] will be stretched over all chunks.

\
**Origin** - Generated mesh origin position can be in (x0, y0, z0) or the same as it has in a scene. If terrain does not exist in a scene and is selected from **Project** folder position (x0, y0, z0) is used.<br>

**File Name Prefix/Suffix** - Adds prefix and suffix for the generated file name.&#x20;

\
**Save Location** - Generated OBJ file can be saved in three locations:

* **Same Folder** - File is saved in the same folder as the source Terrain asset.
* **Same Subfolder** - File is saved in the same folder as Terrain asset, but inside a custom subfolder.
* **Custom Folder** - Allows saving OBJ file in any directory on the hard drive. Directory requires\
  Read/Write permeation.


---

# 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:

```
GET https://amazing-assets.gitbook.io/terrain-to-obj/how-to-use.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.
