Mesh Split
Split large meshes into smaller chunks to improve rendering performance through Unity's built-in frustum culling. Features customizable grid sizes, multi-axis splitting, optional collider generation, and parallelized burst code for efficient runtime or editor usage. Preserves original vertex data format and automatically handles 16/32 bit indexing.
com.artnas.meshsplit 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/meshsplit.git README Markdown
Copy this to your project's README.md
## Installation
Add **Mesh Split** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/meshsplit.git
```
[](https://www.pkglnk.dev/pkg/meshsplit)Dependencies (3)
README
Unity Plane Mesh Splitter
What is the purpose of this tool?
Say you have a gigantic terrain in a single mesh. Unity is going to process the entire mesh when rendering it even though only a small section in front of the camera is visible.
This tool lets your split this large mesh into smaller submeshes which should greatly improve the performance thanks to the built-in Unity frustum culling (only visible meshes will be rendered).
Features
- Simple to use
- Customization:
- Grid size
- Multiple axes (in any combination)
- Generate convex/non convex colliders
- Nice performance
- Parallelized burst code
- Pointers and memcpy
- Maintains exact original mesh vertex data format
- Automatic 16/32 bit indexing based on vertex count
- Doesn't modify the existing mesh.
- Can be used both in editor and at runtime.
- Submeshes persist when saving the scene.
Description
A tool which lets you split any mesh into smaller submeshes. At first it was designed to work with imported Tiled2Unity terrains, but I rewrote it to work with everything you can throw at it.
In 2022 I rewrote it again to improve it and solve some problems. I used the new mesh building API and simplified the vertex data copying process - it now copies data directly from the meshes vertex data buffer, retaining the same vertex data structure as the original mesh. Burst allowed me to improve performance and spread work across multiple threads.
Installation
Install this tool using Unity Package Manager: https://github.com/artnas/Unity-Plane-Mesh-Splitter.git


for versions compatible with older versions of unity go to Releases
Compability
- Release version 1.0 is compatible with older versions of Unity.
- New releases work with Unity 2021.2 and above
Usage
MeshSplitController component
Add the "MeshSplitController" component to the game object you want to split and press the "Create submeshes" button. Press "Clear submeshes" to revert.
API
// mesh to split
Mesh mesh;
// create a mesh splitter with some parameters (see MeshSplitParameters.cs for default settings)
var meshSplitter = new MeshSplitter(new MeshSplitParameters
{
GridSize = 32,
GenerateColliders = true
});
// split mesh into submeshes assigned to points
var subMeshes = meshSplitter.Split(mesh);

TODO
- Support for submeshes with various materials
- Align the gizmo grid with split planes
No comments yet. Be the first!