Glb external referencing

Hi Cesium team.

I am a software developer working on a project to generate contents to use in Cesium. We have a performance issue when we load our scene.

I have two simple objs that sharing a simple jpg image. When I generate 3d tile using model tiller. It produced tileset with some b3dm files. Unfortunately, I saw that each b3dm has its own copy of the image inside the glb content. We know that glb files support external referencing like gltf.
Before implementing a post processing that will modify the glbs inside b3dm files to use external referencing, I have two questions.

  1. Does Cesium render engine support glb external referencing or not? I mean when it tries to load two b3dm files into the memory that they have a similar external reference, does it import the reference two times or only once?
  2. I know that Cesium for optimisation is generating a texture atlas. In the above case, when it is generating the atlas does it duplicate the same texture or not?

Thanks for your support

I looked at the code and this is what I understood.
For each image there is a key. When they load it to the cache, they can keep track of the image in the cache using this key. For images come from uri, the key is the absolute path of the uri. So, it means, images from same uri shouldn’t be duplicated in the cache.

But if an image is embedded inside the glb, then image will be duplicated in the cache because their key will be different.

Texture atlas also follow similar approach. If the image id exists, then it won’t duplicate the image.