[SOLVED] Rendering a large number of rotating cubes

I have a lot of cubes in the scene
each cube tri : 488
camera count : 1
cubes cast shadow : disabled

When 60 number (or more) of cubes is placed on the screen , frame rate reduced
To solve this problem, I completely eliminated rigidbody and physics
and performance improved
Now I just want to render the cubes that can be seen through the camera
the cubes can be rotated

Another solution I did was this
I cast a ray on the cubes from the camera, and hid the cubes that the rays did not hit
But because I cast the rays to the center of the cube, some cubes with visible corners were also hidden

Please send me your suggestions

Hi @mrb71,

From what I see you have cubes that use the same material/texture, that means those can be batched.

Try using dynamic batching to have those cubes render in a single draw call, that will improve performance a lot in your case:



Thanks @Leonidas It optimized very well. :hugs:

1 Like