---
title: "Unity Sprite Mesh Optimization: Tight vs Full Rect"
description: "Learn how to optimize Unity sprite meshes using Tight mesh type. Reduce overdraw and improve game performance with TexturePacker's polygon mesh optimizer."
canonical: "https://www.codeandweb.com/texturepacker/tutorials/optimizing-unity-sprite-meshes"
date: "2023-08-24T00:00:00.000Z"
modified: "2023-08-24T00:00:00.000Z"
source: "html"
---

# Unity Sprite Mesh Optimization: Tight vs Full Rect

Andreas Löw

[texturepacker](https://www.codeandweb.com/texturepacker/tutorials.md),  [unity](https://www.codeandweb.com/tutorials/unity.md),  [optimization](https://www.codeandweb.com/tags/optimization),  [mesh-type](https://www.codeandweb.com/tags/mesh-type)

![Unity Sprite Mesh Optimization: Tight vs Full Rect](https://www.codeandweb.com/static/759e5d406267f547545fa67f5d3e990a/a6312/post-image.png)

Polygon mesh sprites are a way to improve rendering performance and increase your frame rate.

In 2D rendering, performance is usually limited either by **overdraw (GPU / fill rate)** or by **vertex processing (CPU)**. The shape of a sprite mesh directly affects this trade-off.

[TexturePacker](https://www.codeandweb.com/texturepacker.md) not only creates optimized sprite meshes but also packs them tightly into a [Sprite Atlas](https://www.codeandweb.com/texturepacker/tutorials/using-spritesheets-with-unity.md).

You'll learn how you can enable polygon packing and make use of it in your Unity project.

TexturePacker has two important features for Unity users:

*   Optimized polygon mesh sprites: similar to Unity's **Tight** Mesh Type but with better optimization
*   Polygon packing: to reduce texture memory in your Sprite Atlas

## Full Rect vs Tight: Understanding Unity's Mesh Type

In Unity's Sprite import settings, the **Mesh Type** option controls how the sprite mesh is generated:

*   **Full Rect**: A simple rectangle covering the entire sprite bounds. Fast to render but includes all transparent pixels.
*   **Tight**: A polygon mesh that fits tightly around the opaque pixels, reducing overdraw — but requiring more vertices.

TexturePacker gives you full control over the trade-off between overdraw and vertex count through the **Trim mode** setting:

| Trim Mode (TexturePacker) | Mesh Type (Unity) | Vertices | Overdraw | Best For |
| --- | --- | --- | --- | --- |
| **None** | Full Rect | 4   | High | Simple sprites without transparency |
| **Crop, keep position** | Full Rect | 4   | Medium | Sprites with transparent borders, CPU-constrained platforms |
| **Polygon** | Tight polygon | Many | Low | Complex shapes, GPU-constrained platforms |

**Crop, keep position** is a good default for many projects: it removes transparent borders while keeping a simple 4-vertex mesh. The pivot point is automatically adjusted to compensate — keeping your animations smooth.

Despite the visual trimming, this still produces a **Full Rect** mesh in Unity, not a Tight mesh.

For maximum performance, **Polygon** mode creates tight-fitting meshes around your sprites. Unity's built-in **Tight** mesh type does the same, but offers no control over the optimization. TexturePacker gives you direct control through the **Tracer Tolerance** slider:

*   **Lower values** (50-100): Tighter fit, less overdraw, more vertices
*   **Higher values** (200+): Fewer vertices, more overdraw
*   **Recommended default** (100-200): Good balance for most games

Here's how TexturePacker's optimized meshes compare to Unity's built-in Tight mesh:

  ![Sprite polygon quality in Unity and TexturePacker](https://www.codeandweb.com/static/6f068b60d9296767cae0523f3301be11/283d3/optimizing-unity-sprite-meshes.png)

TexturePacker typically reduces triangle count by 30-50% compared to Unity's built-in mesh generation while maintaining a tight fit.

To enable polygon meshes, set **Trim mode** to **Polygon** in TexturePacker. The [TexturePacker Importer](https://assetstore.unity.com/packages/tools/sprite-management/texturepacker-importer-16641) automatically applies the optimized meshes to your sprites in Unity.

  ![Sprite polygon mesh quality: pixels vs triangle count](https://www.codeandweb.com/static/a6f1f49462cc592c7af43cc935a7b8ee/283d3/mesh-quality.png)

Use the visual feedback to find the right balance: if you see significant transparent areas inside the mesh, lower the tolerance. If your game is CPU-bound, increase it to reduce vertex count.

## Polygon packing

Set TexturePacker's **Algorithm** to **Polygon** to pack sprites based on their actual outlines rather than bounding boxes. This takes longer than MaxRects but can significantly reduce atlas size — especially for irregularly shaped sprites.

| Algorithm | Recommended Trim Mode | Notes |
| --- | --- | --- |
| **Polygon** | Polygon | Works with Crop - but usually does not pack better than MaxRects |
| **MaxRects** | Polygon or Crop | Polygon for less overdraw, Crop for fewer vertices |

Notice how sprites interlock based on their actual shape rather than rectangular bounds. Packing more sprites into a single sheet reduces the total number of sprite sheets, which in turn reduces texture switches at runtime:

  ![Polygon mesh packing with TexturePacker](https://www.codeandweb.com/static/435453ef66d3444412386d050eedb0cb/283d3/texturepacker-unity-polypack%402x.png)

The TexturePacker Importer applies the data generated by TexturePacker during the import process only. It reads polygon outlines, mesh vertices, and pivot data from the `.tpsheet` file and assigns them to the corresponding Unity sprites. No importer code runs at runtime or on the target device.

  ![Packed sprite using polygon mesh sprites](https://www.codeandweb.com/static/57c83e1e41f8f4679714b5d42b45f5cf/283d3/polygon-mesh-packing-with-texturepacker.png)

## When polygon meshes are not the right choice

Polygon meshes are not always beneficial. Very small sprites, simple rectangular artwork, or large numbers of short-lived particles may perform better with **Full Rect** meshes due to lower vertex overhead.

## Summary

To optimize sprite rendering in Unity with TexturePacker:

1.  Set **[Trim mode](https://www.codeandweb.com/texturepacker/documentation/texture-settings.md#trim-mode)** to **Polygon** for optimized meshes
2.  Use **[Tracer Tolerance](https://www.codeandweb.com/texturepacker/documentation/texture-settings.md#tracer-tolerance)** 100-200 as a starting point
3.  Set **[Algorithm](https://www.codeandweb.com/texturepacker/documentation/texture-settings.md#algorithm)** to **Polygon** for tighter atlas packing
4.  Import with the free [TexturePacker Importer](https://assetstore.unity.com/packages/tools/sprite-management/texturepacker-importer-16641)

This gives you 30-50% fewer triangles than Unity's built-in Tight mesh, full control over the vertex/overdraw trade-off, and more efficient atlas packing.

TexturePacker runs independently of Unity and can be used as a preprocessing step. Optimized sprite sheets can be checked into version control, reducing import times and build complexity. This workflow also allows artists to deliver ready-to-use sprite atlases instead of individual sprite files.

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "headline": "Unity Sprite Mesh Optimization: Tight vs Full Rect",
  "author": [
    {
      "@type": "Person",
      "name": "Andreas Löw"
    }
  ],
  "dateModified": "2023-08-24T00:00:00.000Z",
  "image": "/static/759e5d406267f547545fa67f5d3e990a/a6312/post-image.png"
}
```
