# Should I use multiple BillboardCollections?

**URL:** <https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685>\
**Category:** CesiumJS\
**Created:** [November 18, 2014, 2:14pm UTC](https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685 "2014-11-18T14:14:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jim](https://community.cesium.com/u/Jim)\
**Post date:** [November 18, 2014, 2:14pm UTC](https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685/1 "2014-11-18T14:14:37Z")

</div>

I am adding anywhere from 5K - 25K billboards to my map, alot of the icons are the same, but there could be over 1000 different icons used...

Is it more efficient to have 1 billboard collection for everything, or should I have a billboard collection per image (all billboards in that collection would share the same icon)?

Currently, I have made a prototype using 1 billboard collection where I reuse the same imageIndex from the billboard collection's TextureAtlas when an icon has already been used.

Thanks in advance for the feedback.

---

<div class="post-metadata">

**Author:** ![Jim](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jim](https://community.cesium.com/u/Jim)\
**Post date:** [November 19, 2014, 12:48pm UTC](https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685/2 "2014-11-19T12:48:11Z")

</div>

Does anybody know the answer to this?

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [November 19, 2014, 4:27pm UTC](https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685/3 "2014-11-19T16:27:47Z")

</div>

As a general rule; the fewer billboard collections you have, the better performance will be. The only exception I can think of is if your data is geographically separated such that if one collection is in view others are not; you might get a slight performance increase (but that might be negligible) because all billboard’s in a collection are culled together. The above rule actually works for all Primitives and collections.

1000 different icons isn’t anything to worry about. It’s technically possible for a texture atlas to get too big; but that depends on the size of the icons and the capabilities of the underlying video card. For example, on my ancient 8800GT, the max texture size is 8192x8192, that’s 66592768 pixels. Even if all of my icons were 128x128, (16384 pixels), I would still be able to have 4096 icons before my texture got to big. If you have more reasonable icons, like 48x48, the limit is around 30k. So unless you have gigantic images, it will never be a problem.

---

<div class="post-metadata">

**Author:** ![Jim](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jim](https://community.cesium.com/u/Jim)\
**Post date:** [November 19, 2014, 5:04pm UTC](https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685/4 "2014-11-19T17:04:02Z")

</div>

Awesome, thanks.

---

<div class="post-metadata">

**Author:** ![Mark\_Erikson](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mark_erikson/32/2024_2.png) [@Mark\_Erikson](https://community.cesium.com/u/Mark_Erikson)\
**Post date:** [November 19, 2014, 6:18pm UTC](https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685/5 "2014-11-19T18:18:40Z")

</div>

Hi, Matthew. I wanted to follow up on this because I noticed the limitations of TextureAtlas the other day and posted a question about them ( [https://groups.google.com/forum/#!topic/cesium-dev/cF9Vt28Wk-4](https://groups.google.com/forum/#!topic/cesium-dev/cF9Vt28Wk-4) ), and someone else seemed to be actually experiencing this as a problem shortly thereafter ( [https://groups.google.com/forum/#!topic/cesium-dev/Qd\_LRhmlb50](https://groups.google.com/forum/#!topic/cesium-dev/Qd_LRhmlb50) ).

Would it be possible to update Billboard and TextureAtlas to allow updating the texture for a given image ID, rather than bailing out as it does now? Seems like that would greatly improve behavior in the case of dynamically updated billboards, as otherwise we do just keep having to add new textures to the same atlas.

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [December 11, 2014, 6:09pm UTC](https://community.cesium.com/t/should-i-use-multiple-billboardcollections/1685/6 "2014-12-11T18:09:16Z")

</div>

Sorry for not getting back to you sooner. I just submitted an issue in Cesium to eventually cover this use case: [https://github.com/AnalyticalGraphicsInc/cesium/issues/2319](https://github.com/AnalyticalGraphicsInc/cesium/issues/2319)
