Original Post
Hi, when I have hundreds of objects, having ~10 materials each, rendering will be slow because of the large number of batches. The first thing that comes to my mind is using atlases, the second is occlusion culling. First, I tried creating atlases, then merging the meshes of objects, but then, I still had many-many DrawPrim calls, because not all materials can be merged by an atlas, and I have to render my scene twice if using shadow volumes for one light (and even more times, it I have more lights) Then, I've found that maybe I could use occlusion culling to reduce the number of objects to render, but then I realized that it will not decrease the number of DP calls, as I will have to call one for each object anyway (even if it's just a bbox). So I need more agressive batching (merging different objects, by duplicating and baking in transformations). But this makes occlusion culling even more impossible, as all I can do is to start a query for a bunch of parts of totally independent objects, which doesn't really seem to make sense. So where is a good balance between the two? Does it worth doing occlusion culling in this situation at all? How do you usually solve this dilemma? Thanks for your kind help, kp