I’m Generating random terrain using perlin noise. My scene has around 50000 Gameobjects.
It’s 128x128 map. Gray block are generated only if necesarry to fill in the blank spaces. My problem is: Framerate is rather low. Profiler shows, that ~93% of frame time is used by Camera.Render . How can I improve performance?
Cubes are generated by instantiating prefab. I tried cube prefab, and it had best results. Then i tried to make the cube out of plane and then after building terrain turn off planes next to another block (Called one time, not in Update). CPU time was doubled. Then i noticed, that stock unity plane has a lot of verticles, so i used plane from blender. No improvements. I’ve seen nomething about constructing mesh from script, but i don’t know if framerate will get any better.
I don’t want to use anything resembling chunks. Terrain won’t be saved.
I can’t use baked occlusion culling, because scene is randomly generated using random seed.