Unity-Plane-Mesh-Splitter icon indicating copy to clipboard operation
Unity-Plane-Mesh-Splitter copied to clipboard

Mesh is split up in odd chunks.

Open asusralis opened this issue 3 years ago • 3 comments

We wanted our terrain to be split up more into quadrants, but it instead splits up into seemingly arbitrary pieces. You can see some of the pieces highlighted in orange: image

Is there a way to split in up into roughly squares?

asusralis avatar Oct 05 '22 16:10 asusralis

Hey. The script iterates all triangles, calculates their centers and groups them by closest grid coordinates, so it should work as you expected. Is the model really small or unusual in some way? I'm working on a solution to fix splitting very small models (with grid size less than 1).

Edit: I just pushed an update - see if it changes anything. I see that the model uses greedy meshing, so triangles might be quite large, but this still doesnt quite explain why they seem so random, can you provide the model and split settings so i can see whats going on?

artnas avatar Oct 05 '22 23:10 artnas

The model is actually pretty big in terms of unity's units. We create our model in MagicaVoxel & use a voxel mesh optimizer, so it's possible it is unusual. Here is the wireframe of the mesh. image

Is there any way to increase the grid size beyond 256? Even at max there are about 110 submeshes.

asusralis avatar Oct 06 '22 09:10 asusralis

Right now you can increase the max size in the script. I'll change it later

artnas avatar Oct 06 '22 12:10 artnas