Unity camera render performance with many terrains
Hi, I am currently building a tile based game where the tiles are represented by unity terrain objects. Unfortunately the performace goes down linear with the amount of tiles I generate. I identified the process Camera.Render to be responsible for my bad performance but honestly this is where my knowledge stops. I already activated Occlusion Culling on my cam so it shouldnt render objects which arent in sight right? Still the performance is equally bad if I look in the distance or just on a few tiles right on the ground. If I disable the camera my game runs just fine which in my opinion shows clearly that it is not because of other performance problems. I think that for some reason all my obects are rendered all the time, even if they are clearly not in sight. Please help :/
EDIT: I just found that of my 99,5% rendering 99,2% go into "Culling" of which 83,9% go into something called "PrepareSceneCullingParameters". The 2 subprocesses of that however show no significant workload. So obviously something culling based is going on but I dont know how to optimize this.
Why are you using terrains as tiles and not simple planes?
Because the terrains are not flat. I designed mountains and coasts and stuff. Also you can place trees on there very easily.
I still don't see the purpose of multiple terrains as tiles. Will you stick them together by random or are those only tiles for a turn based game where one tile equals one movement unit?
Answer by DeathRace26 · Aug 25, 2019 at 10:58 AM
Bump, there is so few threads and still no solution fixing this. Im desperate for help
Answer by AfroDieter · Aug 25, 2019 at 10:07 PM
I am way beyond this now. I think terrains are just something that is supposed to be used for games which feature 1 of them loaded at the same time. There is definetly no process optimizing for multiple terrains and I do not think there ever will be. Sry mate.
If u wanna use customly shaped tiles I recommend building them as 3D models and using these models in your game.
Your answer
Follow this Question
Related Questions
My 3rd Person camera doesnt collide with Terrain... Please Help 0 Answers
Camera.Render() not working in edit/play mode 0 Answers
Terrain slowdown on Android 1 Answer
Screen.width/height are forced to weird values when launched with -batchmode 0 Answers
AR-like Camera Effect, How to Achieve Custom Shaped Culling Masks for Camera? 1 Answer