Why Do Face Count and Draw Calls Increase After Importing a GLB Model into the Babylon.js Editor

I have a GLB model, and these are its statistics.

Stats:
269 draw calls
0 animations
31 materials
587190 vertices
513880 triangles

After importing it into the Editor, the number of materials and vertices remains almost the same, but the number of faces and draw calls increases several times. What could be the reason?

cc @julien-moreau

Hey @Zhe_Zhang !

The “Total vertices” should never move (except when you add or remove meshes in the current scene).
In this panel, everything that is “Active” is updated all 150 milliseconds and concern everything that has been rendered for the current frame. Babylon.js will for each render sort meshes that are out of the camera’s view (frustrum culling: What is Frustum Culling : Frustum Culling Definition | Unity) and will skip them to save performances. This is why “Active faces”, “Active indices”, “Active Meshes”, etc. increase or decrease.

Draw calls may also increase or decrease according to the components that are available in the scene. If a light generates shadows then draw calls maybe be multiplied up to 2x compared to “Total Meshes”. Cascaded shadow may be multiplied up to 4x. Post-processes they generate draw calls too (1 per post-process attached to the current camera or more if using a dedicated render target texture like VolumetricLightScatteringPostProcess).

Some documentation to reduce draw calls: Babylon.js docs

I hope I helped you. If not, don’t hesitate to tell me and I’ll do my best :slight_smile:

I understand now. I tried it in the Editor, all objects cast shadows by default. Disabling this option reduces both active faces and draw calls.

Thank you very much!

1 Like