• too many drawcalls caused by a mesh

Hi guys, I got a peculiar problem : -)

Our game engine uses PIXI 5.2.4 and web GL on Chrome.
We ve noticed some animations cause extra drawcalls. I investigated those, removed all clipping masks and blend modes. It got better but the problem remained.
Then I discovered removing one certain mesh solves it. I see no diffrence between this very mesh and the others that cause no problem.

Exact same situation happened in some other spine animation. The faulty meshes doesnt look suspicious to me.

I attach:

faulty aniamtion ( the one that causes multiple drawcalls)
fixed animation ( the one with removed faulty mesh = draws one drawcall.)
screenshots from a spector js, showing the drawcalls for both files

https://we.tl/t-jIkjE11QWa < download link

No idea what might be causing it. Hope you guys can give some clue, thanks!!

You could just attach the Spine project to the post, no need to use weTransfer.
I think I have an idea of what may be the issue though.

If you try to select the mesh while in animate mode, and open the metrics view:
Metrics - Spine User Guide: Metrics view

The performance problem is likely caused by the very big number that you can see next to Deform vertices. Ideally, you want that number to be 0 for the best possible performance.

More about why deform vertices are bad:
Blog: Mesh weight workflows: Deform keys are the devil

How to achieve the same thing with bones and constraints and great performance:
Mix and Match example: Face control
Owl example: Head

Thanks for the quick reply!

So I did the following to check if this can be caused by the deform vertices:

  1. i removed everything from the animation except for the faulty mesh, and indeed the problem was fixed. So my assumption it's this very meshes fault is proven wrong.

  2. But then I left the original animation untouched, and removed all deform vertices on all meshes. ( it shows 0 in the metrics tab) and it still calls too many draw calls, so its not the deform vertices either.

Any other ideas what has gone wrong?

thanks!

Thanks Erika!

  1. I reduced Number of verts from 250 into 112 and number of deforms from 800 to 40 and the problem remains.

  2. another animation has 48 vert deforms and 256 verts and it works with no problem. so it shouldn;t be an amount problem?

  3. but then again I increased number of verts from 150 into 350 in a diffrent animation and it got spoiled. So I'm completely lost.

Any thoughts on that? thanks

PS What do you mean be keeping everything on one atlas? I ve been making ridicilously big animations and it never spit out two atlases? Or you mean texture sheets? the above animations always use one texture sheet.

Just a little follow up on this.

We're currently looking into the project and exports.
Since there is only a single texture atlas this should not be the cause.

We hope to be able to get back to you soon.

Thanks guys!!
Just a little follow up. We've also discovered that scaling up the symbol in our game engine also causes extra drawcalls for some reason.