Skip to main content

Draw Calls (Materials and Meshes)

Generally, you should keep your material count as low as possible, as every new mesh and material in a scene counts as a new draw call, a draw call is an instruction to the graphics card on what to draw and how to draw it, the more draw calls you have, the more instructions being sent to the graphics card, and therefore the slower it'll be as it's processing all those instructions.

The exact numbers of how many draw calls is "too much" is difficult to gather, because it heavily depends on the computer hardware, however, the lower the better. While many modern computers could run scenes with over 1,000s of draw calls, that doesn't mean it should, you should always aim for the lowest amount of draw calls with your worlds and avatars to ensure performance takes little to no hit.

So remember:
1 Mesh = 1 Draw Call, and 1 Material = 1 Draw Call

So if we had an avatar with 16 skinned meshes and 32 materials, your avatar would beĀ 48 draw calls, which is a bit ridiculous for a single person! If you had 10 people in that same avatar, it would end up beingĀ 480 draw calls! Which is typically the amount a rather medium-sized world would likely have!

In general, draw calls add up, and the best way to reduce them is to reduce your materials and meshes, what are ways you can do that you may ask?

Texture Atlasing

Texture Atlasing should frankly always be done whenever possible. Texture Atlasing is a technique used widely in 3D modeling to optimize models for use in games. There are two ways you can go about this.

CATS Method

The CATS method is generally easy although not ideal, in the CATS menu, you can go to the optimization tab, click Atlas, and hit a button to save it. The atlas textures it generates are often too large and leave a lot of empty space, although it's better than no atlasing at all.

image.png

Manual Method

This one is a bit complicated to explain in text form, so I made this short video.

Reduce Meshes

If you have a mesh that doesn't need to be separated on your avatar, join them together. There's no need to have them separated unless you have an animation to toggle on and off a specific mesh, such as a jacket.

As of the 2022 Unity upgrade, meshes don't need to be split due to shapekeys as this issue was fixed in the Unity version being used. However if your mesh has a lot of shapekeys, you should split for mesh vram reasons, more preferably delete shapekeys you don't use and merge shapekeys that are used together for facial expressions and such.