artnas/Unity-Plane-Mesh-Splitter
소개
Split large meshes in Unity into smaller submeshes
디자인 및 미디어What you can do
- Multiple axes (in any combination)
- Generate convex/non convex colliders
- Parallelized burst code
- Pointers and memcpy
측정된 스타 증가
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalUnity 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
관련 프로젝트 살펴보기
불러오는 중…