Question about materials and texture atlases

Hello,

I have several models from my artist. Each model has its own material and some of the materials share one texture but even so there are a lot of textures (about 20).

I came from 2D world and I was using Phaser framework. In Phaser, I usually packed all the images into one large texture atlas (with TexturePacker) becuase this can reduce WebGL draw calls a lot.

I have two questions:

  1. Does number of textures required by materials increase number of WebGL draw calls in Playcanvas?
  2. Is there some program or utility for updating materials and packing their textures into one texture atlas or does this has to be done during creating of models by an artist?
  1. It will not increase the number of draw calls, directly, since draw calls are measured by the number of unique non-batched meshInstances included in your scene. Even if all of your meshInstances use the same material, if you don’t batch them, they will still require one draw per mesh instance.

It’s a good practice to try to pack textures, not only diffuse but also opacity, normal or height maps, making use of empty texture channels. That will reduce the number of files/http requests required to fetch the assets speeding app your app loading time.

And also will reduce your VRAM usage, which is quite important if you are targeting mobile devices.

  1. I am not aware of one, usually this is part of the artist’s / modeller’s pipeline to pack everything and uvw unwrap the models accordingly.