Error loading image for billboard: DeveloperError: Width must be less than ... maximum texture size

1,594 views
Skip to first unread message

jsto...@gmail.com

unread,
Jun 14, 2015, 5:31:32 PM6/14/15
to cesiu...@googlegroups.com
I have a rather large billboard which gets updated roughly ever 6 seconds. The billboard conforms to a customer standard (which contains a symbol, heading, speed, vehicle identifier, ...).

After some time I receive an error message stating "Error loading image for billboard: DeveloperError: Width must be less than or equal to the maximum texture size".

I believe I am running into the TextureAtlas problem documented in issue #2319 https://github.com/AnalyticalGraphicsInc/cesium/issues/2319
where every time I update the image on the billboard a new image is added to the TextureAtlas. Currently it does not seem that unused images are ever being reclaimed by the TextureAtlas.

I am trying to circumvent the problem from happening. I was thinking about creating a billboardCollection per image and rather than updating the billboard image attribute I would destroy the billboard collection which in turn would destroy the TextureAtlas. I then would recreate the billboardCollection and billboard with the new updated image.

I was wanting to know if anybody else has run into this problem past? And how did they get around it?

Thanks in advance

J. Stoy

Mark Erikson

unread,
Jun 14, 2015, 6:47:31 PM6/14/15
to cesiu...@googlegroups.com, jsto...@gmail.com
Yeah, I brought this up as a potential issue in https://groups.google.com/d/topic/cesium-dev/cF9Vt28Wk-4/discussion

It does seem like the situation could be definitely improved with a bit more bookkeeping internal to Cesium.  It's been far too low a priority for me to even consider trying to work on it myself, though.

Destroying the BillboardCollection certainly seems "wasteful", but also seems like the only real answer at the moment.  Maybe add some logic to only do it every so often?

jsto...@gmail.com

unread,
Jun 14, 2015, 9:34:29 PM6/14/15
to cesiu...@googlegroups.com, jsto...@gmail.com
Mark,

I agree, I'll put a count in place and if the count gets greater than X (some tunable value) i'll destroy and create the collection, and reset the count back to 0.

Thanks

J. Stoy

vasc...@aol.com

unread,
Jun 14, 2015, 11:11:04 PM6/14/15
to cesiu...@googlegroups.com
J. stoy,

I have experienced exactly  the same issue when rendering approximately 2 ,000 billboards in less than 30 seconds with images of type canvas. I'm using the viewer.entities,Cesium version 1.9, and Firefox.
The texture atlas for some unknown reasons can not keep up with the heavy loading of billboards. When this issue  happens all the already rendered billboards increase in size indicating to me that tne texture atlas got full.  I'm able to replicate the issue every time. The fix in my case was to first render one billboard in its own transaction,  and then render the 2,000 billboards in another transaction. After I render the first billboard, I tested with 3000, 4000, 6000 and I don't experienced the issue anymore. The texture atlas associated to the viewer.entities appears not to be fully initialized when I start the map. Only when I add one billboard, then everything is fine. I know my fix is not really a fix, but it is a workaround for the issue. I hope this workaround can give the Cesium experts a better understanding of the issue.

Thanks,

Alberto
.


where every time I
update the image on the billboard a new image is added to the TextureAtlas. 
Currently it does not seem that unused images are ever being reclaimed by the
TextureAtlas.  

I am trying to circumvent the problem from happening.  I was
thinking about creating a billboardCollection per image and rather than updating
the billboard image attribute I would destroy the billboard collection which in
turn would destroy the TextureAtlas.  I then would recreate the
billboardCollection and billboard with the new updated image.

I was wanting
to know if anybody else has run into this problem past? And how did they get
around it?

Thanks in advance

J. Stoy

-- 
You received this message
because you are subscribed to the Google Groups "cesium-dev" group.
To
unsubscribe from this group and stop receiving emails from it, send an email to
cesium-dev+...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.

Yonatan Kra

unread,
Oct 1, 2015, 9:57:06 AM10/1/15
to cesium-dev, jsto...@gmail.com
This happens to me on FF no matter how many billboards I try to create. It can be 1 or 100 or 1000.
Happens 100% of the times.
Running Cesium 1.13 on FF 41.0.1.
The workaround did not help.

Hannah Pinkos

unread,
Oct 1, 2015, 1:12:37 PM10/1/15
to cesium-dev, jsto...@gmail.com
Hello Yonatan,

Can you please paste a code example?  I can't reproduce this error in Firefox 41.0.1

Thank you,

Hannah

Yonatan Kra

unread,
Oct 1, 2015, 1:44:10 PM10/1/15
to cesiu...@googlegroups.com

Daniel Bagnell

unread,
Oct 1, 2015, 5:10:59 PM10/1/15
to cesium-dev
Yonatan, this is a known issue in Chrome and Firefox when using SVG images. See issue #2907 for details: https://github.com/AnalyticalGraphicsInc/cesium/issues/2907

On Thursday, October 1, 2015 at 1:44:10 PM UTC-4, Yonatan Kra wrote:

Matthew Amato

unread,
Oct 1, 2015, 5:31:40 PM10/1/15
to cesiu...@googlegroups.com
You specific error sounds like you are using an incorrect SVG file, that issue that Dan linked to has a comment from me on how to fix it.

--

Yonatan Kra

unread,
Oct 2, 2015, 3:06:43 AM10/2/15
to cesiu...@googlegroups.com
This solved the issue on FF :)
It was working on Chrome without issues.  When I add the height/width, it now shows the double images bug (https://code.google.com/p/chromium/issues/detail?id=500180) even though I draw the image to a canvas and return the canvas to the billboard image.
It's not hard to add height/width when in FF (or remove height/width when on chrome) since I already manipulate the SVG dynamically.  But that's not the case for most ppl I guess.  Since it's a browser's issue, I guess we have nothing to do but hope it would be solved eventually.
Thanks a lot :)

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/JzpfPUvBdEA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages