# Terrain To Mesh

[**Terrain To Mesh**](https://assetstore.unity.com/packages/tools/terrain/terrain-to-mesh-195349?aid=1011lvgVb) is a powerful Unity editor tool that converts built-in terrains into optimized mesh assets while preserving visual quality. It offers full control over vertex density, texture baking, and material generation, allowing you to fine-tune performance for mobile, VR, or large-scale projects.

Alongside its editor tools, **Terrain To Mesh** also provides a complete runtime API with identical functionality, enabling dynamic terrain-to-mesh conversions during gameplay or procedural scene generation.

#### Key features:

* **Ultra-fast conversion** — Instantly transform terrains into optimized meshes.
* **Full vertex control** — Precisely adjust mesh resolution for any performance target.
* **Built-in decimation & LOD support** — Generate LOD Groups and reduce poly counts effortlessly.
* **Mesh split system** — Seamlessly handle large terrains by splitting them into manageable mesh chunks.
* **Splatmap material rendering** — Render converted meshes using a splatmap-based material that accurately imitates Unity’s built-in terrain shader, supporting up to **16 texture layers** rendering in one pass.
* **Basemap textures baker** — Bake terrain layers into one texture, ready-to-use with any materials.
* **Trees, grass & details exporter** — Export all vegetation elements from terrains.
* **OBJ & FBX exporters** — Export generated meshes for external editing or other engines.
* **Runtime API included** — Perform the same conversions dynamically during gameplay.

{% hint style="warning" %}
⚠️Note:

* Converted meshes cannot fully replace Unity’s built-in terrain system. Meshes will not provide the same rendering quality, flexibility, or feature set as the native terrain engine.
* **Terrain To Mesh** works only with Unity [TerrainData](https://docs.unity3d.com/ScriptReference/TerrainData.html) object (not [Terrain](https://docs.unity3d.com/ScriptReference/Terrain.html)) and exports mesh, textures and materials only from it. Custom terrain shaders and tree/grass placement assets may not be fully supported.
* While Unity terrain supports unlimited layers, the **Terrain To Mesh**'s splatmap-based shader is limited to **16 layers**. Actual usable textures may vary depending on the target device’s capabilities. Some mobile or VR devices may not support rendering all 16 layers with multiple textures per layer.
* Holes in the generated mesh are not cut, instead they are rendered using **Alpha Cutout** shader.
  {% endhint %}
