# Vertex Forge

### Introduction <a href="#compatibility" id="compatibility"></a>

[**Vertex Forge**](https://assetstore.unity.com/packages/tools/utilities/vertex-forge-324743?aid=1011lvgVb) is a flexible editor and runtime tool for baking any kind of textures and maps directly into mesh - per vertex. Those can be regular texture assets, camera reflection or ambient lighting cubemaps, and even scene lightmaps.

By storing textures in vertex buffer instead of separate files, significantly can be reduced disk usage and final project build size - making **Vertex Forge** a smart optimization tool for performance-focused projects.

<figure><img src="https://3236384957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bJQufs8ilcr2v0cWqjK%2Fuploads%2FOfmZwV3NdfW7hkDuHkRI%2Fposter_2.png?alt=media&#x26;token=2fdff229-8f54-45bb-adef-4a05c088ed6b" alt=""><figcaption><p>Right mesh doesn't use diffuse texture, it is baked inside mesh vertex color.<br><a href="https://assetstore.unity.com/packages/3d/vehicles/land/retro-cartoon-cars-66876"><mark style="color:orange;">Retro Cartoon Cars</mark> asset by RCC Design</a></p></figcaption></figure>

<figure><img src="https://3236384957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bJQufs8ilcr2v0cWqjK%2Fuploads%2FILjrY9HseoeKwczCEHKT%2Fposter_3.png?alt=media&#x26;token=0e8784ce-ed2b-4a81-9e98-e9dd624bfd0e" alt=""><figcaption><p>Meshes on the left side use diffuse and baked lightmaps.<br>Meshes on the right use 0 textures - everything is baked inside mesh.<br><a href="https://assetstore.unity.com/packages/3d/environments/dungeons/low-poly-dungeons-lite-177937"><mark style="color:orange;">Low Poly Dungeons Lite</mark> asset by JustCreate</a></p></figcaption></figure>

<figure><img src="https://3236384957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bJQufs8ilcr2v0cWqjK%2Fuploads%2FGskBPkfRYTZtzNJhfSX0%2Fposter_1.png?alt=media&#x26;token=ff8e48c0-fd11-45fa-a49b-0b51b9ab10a8" alt=""><figcaption><p>Leaves thickness, ambient occlusion, wind resistance and face top/down values are baked inside mesh.<br><a href="https://assetstore.unity.com/packages/3d/vegetation/meadow-environment-dynamic-nature-132195?aid=1011lvgVb"><mark style="color:orange;">Meadow Environment - Dynamic Nature</mark> asset by NatureManufacture</a></p></figcaption></figure>

In addition to its runtime capabilities, **Vertex Forge** includes robust editor tools that support simultaneous baking of up to 12 textures into mesh. The editor also features built-in mesh combining and optimization tools, helping streamline complex workflows and reduce draw calls - ideal for scene performance tuning and asset refinement.

**Considerations & Limitations:**

While the **Vertex Forge** tool offers a powerful way to optimize project by baking textures directly inside mesh, a few factors should be considered:&#x20;

* Per vertex texture baking should not be used as an alternative for the common texture rendering. Instead, it is an optimization method for reducing texture files count inside a project and speed up mesh rendering using special shaders that don’t use texture rasterization and read baked data directly from a mesh.
* Textures inside mesh are baked per vertex and the quality and resolution of the result directly depends on vertex density. Therefor not all models may be ideal for texture baking. Extremely low-poly meshes might not benefit from the baked data:

<figure><img src="https://3236384957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bJQufs8ilcr2v0cWqjK%2Fuploads%2FcUO88AMeSI0aCBSPGnJN%2Fvertex_count.gif?alt=media&#x26;token=f2f2fbb4-223e-4e3c-86fc-2c08daed4c5e" alt=""><figcaption><p>Demonstration of how baked texture quality depends on the vertex density of a mesh </p></figcaption></figure>

* Custom shader requirement - **Vertex Forge** tool allows baking textures inside any mesh vertex buffer and package includes **Preview** shader for rendering this baked data. However it is up to the user to create and setup custom shaders for reading this baked data from a mesh and render it according to the requirements.
