Draw call optimization

Hello! i have trying to optimize draw calls to my scene for gear vr, the problem is i don’t have so much polygons, (10k), all objets are static, i use just 6 different materials, but the draw calls grows up to 350 (100 recommended max by epic). i don’t now what to do again because i think i have optimized polygones to maximum low poly.

All object are static

The pawn actor is a little car very small in the road. Does the scene size have an influence on draw calls ? If i set the set scale from 5 to 1 for exemple and i reduce the pawn size to does it optimize draw calls ? Have you an idea about other ways to optimize draw calls ?

Thanks !

Hi, the number of draw calls is the number of objects with the number of different elements on each object. Polys and size of meshes will not reduce draw calls. Everything is drawn twice left and right eye so actually the limit is more like 50 objects in total. Tricks to get around that is to use Instanced Static Meshes for the same objects which results in just 1 draw call! If you’re doing a track for your car be sure to use instanced static meshes for the road (supported for gearvr since 4.11)

To add to what @aussieburger said, instanced static meshes don’t quite work with LODs. So that’s not an option is you need to have LODs on meshes. HISMC (hierarchical instanced static mesh component) is a way to go, except it doesn’t work with static lighting :confused:

I also would like to add ( since I wasn’t aware ) that the skeletal meshes don’t use batching and they use a higher number of triangle to process the skinned mesh itself.

In case someone need it, the best things to reduce drawcalls is to:

  • merge nearby meshes into a single mesh using the “merge actors” window in “developper tools”
  • using few materials because 1 material = 1 drawcall. Using texture atlas helps a lot with this.
  • Using precomputed visibility to cull occluded objects because mobile can’t do them in realtime.
  • Set a “desired max draw distance” for every mesh.