Terrain patch size is tiny, GPU instancing broken.

Hi there! I’m trying to build a sort of “floating island” design, each separated inside small scenes. I’d like to use Terrain, and have fairly small terrains - 300x300 would be huge.

However when I set this up, it appears that the terrain gets split up into very tiny patches – I’d say probably… 5 meters squared or less, perhaps. this also means that my detail meshes aren’t getting batched correctly because they’re being split by the terrain batches. it also means that my terrain its self is being split into a huge amount of draw calls.

is there something that can be done about any of this? I’m exploring actually ripping all of the terrain details out and batching them manually using DrawInstanced but I’d rather not created a bloated pipeline if I can avoid it. Even so, the terrain its self would still be using an absurd number of draw calls.

Unity terrain sucks for performance, especially on smaller scale.
There is a project on github where you can export terrain to a 3D model, which will perform better

Hey thanks for the heads up, I’ll take a look right now.

btw, quick update from me, it looks like these patch sizes scale with the terrain, which seems to me to be transparently insane but perhaps there’s a good reason. if I create a massive terrain that’s 90% painted out as a “hole,” unity can render the same size terrain area in 6 patches, as opposed to ~23 or so. draw calls also reduce from about 400 to about 70. So… welp.

I guess I’ll try to google this github project.

1 Like

Yeah Unity recommends nothing smaller than 1000x1000 actually

1 Like