- Home /
Splitting Procedurally Generated Mesh, Based On Height
Hello! I have been working on creating a procedurally generated world. The image attached shows a simplified representation of the terrain. I have spent so many hours trying to figure this out, and I have been unsuccessful; hence why I am asking anyone for help.
- Picture showing a basic terrain generation - Picture showing any triangles from 'x' height or above to be moved onto a separate mesh
My problem, is that I want to create biomes, and the only way I can possibly think of doing this, is by splitting the terrain into a sub-mesh to give it a different color.
So my question is: how can I divide a mesh into two separate meshes, by the y position of the triangles?
If you have any other questions please let me know!
just to let you know, all you need to get a different color is either by setting the vertices color property and using a shader making use of that, or assigning different material ids and then use multiple in the $$anonymous$$eshRenderer Array.