Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh is split up in odd chunks. #13

Open
asusralis opened this issue Oct 5, 2022 · 3 comments
Open

Mesh is split up in odd chunks. #13

asusralis opened this issue Oct 5, 2022 · 3 comments

Comments

@asusralis
Copy link

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?

@artnas
Copy link
Owner

artnas commented Oct 5, 2022

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?

@asusralis
Copy link
Author

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.

@artnas
Copy link
Owner

artnas commented Oct 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants