- Home /
Lots of terrain details makes my batch count high. Ideas?
Okay Im making simple games, currently I have a terrain, about 50-100 static objs and 20~ moving ones. 10 lights in total. lightmaps doesnt matter(i swear). Batches are about 4-8k in total. Changes when looking in unpopulated regions. Then after years of trying and s*it I disabled draqing details. It worked. 1200~ batch maximum, my "NASA Computer" graphics quality is running on 25 fps on my potato 2x2.1Ghz athlon! LOL! Okay, I still want my details distance back to 100, which makes the batch count high as a mountain. I searched for batching in google, unity.. I save most of my things by it but the terrain just ignores it completely. Im using the Standard Assets/Environment/Billboards/Grass01 or whatever texture for my grass. What should I change? Thanks.
Exactly, I was wondering why this was happening to me too. I haven't found a solution yet but I'll let you know if I do. I don't want to overdo it on the grass in my particular scene, and yet my batch count skyrocketed just after I put the grass on the terrain for me.
Answer by ModLunar · Feb 08, 2018 at 03:38 AM
Okay I'm kind of in awe -- I just found a setting in the Terrain settings that has a drastic effect on the draw call count. Now I'm just wondering why they had such a seemingly terrible default value for batching terrain details!
The setting is "Detail Resolution Per Patch", you can see its description in the manual here. It says that it's the "length/width of the square of patches renderered with a single draw call." By default for me, it was set to 8. I increased the heck out of that to something like 64 or 128 and my draw calls in the scene I was working in reduced from around 750 to around 245 instantly!
Surely there's more to this than that, I'll need to look more into gpu instancing and the implications of things like this. But hopefully this helps your situation, definitely a very quick fix!
Thanks $$anonymous$$odLunar,
I will consider using it in my projects.
Thanks again, $$anonymous$$