something fun in Terrain Editor, multiple resolutions

I found I could reimport the same texture several times at different scales into the Terrain Painting editor. I usually use 10 or 15 for the large texture then 5 for a smaller detail texture. It’s a huge help with rocky gravelly areas to add subtle variations and it also helps reduce that tiling moire’ that you get from a distance if you randomly lay down a different scale of texture. It adds another layer to the texture paint but I’m not sure how much it’ll affect the performance unless you went nuts.

I would love to know if there is a practical limit to the number of textures since it’s doing a virtual tile of all paint elements? Depending how it’s doing it there might be no affect but I’d love to know. I’d keep ten and under to be safe but will it cause a problem going to 25 or 50 textures? It could happen if you added a lot of environments like a marsh in one part, dirt, rocky, sandy, different colors of fields, grass of different types. Then there’s roads and paths. It’d be a extreme situation but I always love to know where the walls are before I hit them.

I dont know if it makes a difference because terrain seems to be handled much different from standard mesh and texture, but to be on the save side you can reproduce this effect in a paint app for sure without many efforts.

No matter, if you can do it in Unity or a paint app, this idea will definetly make creating terrain more easier. Thanks belseth!

I have no idea regarding the number of textures suitable before hitting performance problems on average systems, but this is in the docs:

I asked Joe this question in the last Unite.
Our studio needed to optimize performance for old IBM Thinkpads with really old graphic cards…

Basically, if I remember correctly, the terrain shaders use 4 splat textures every pass. Meaning, if you have 5 textures - you already need another pass to render the 5th one.
If you have 8 - still 2 passes.
If you have 9 - 3 passes.
And so on…

Now, I don’t remember if one pass is equal to one draw call. But even if it is - 25 textures means 7 passes. 50 is already 13 passes. On an old machine it’s gonna be a drag.

Having said that, in our case that wasn’t the problem. We had 9 textures, so after we cut one out, the move from 3 passes to 2 passes wasn’t that noticeable.

I did a test of this a while back, had 4 textures checked stats – then added a 5th and checked again – I think it went up about 60 draw calls. Seriously. And I didn’t even paint the 5th texture into the world at all.