Was playing around with GUI trying to work out performance cost for tracking multiple elements on the scene. Here is an example of 200 objects being tracked by multiple GUI elements.
Hey Jedi Master @JohnK Thanks for the link. I am working on exactly that right now (another iteration of experiment, it’s addictive). Performance is much better. But have hit yet another wall. Can’t figure out pivot position for planes set to billboard mode. plane.billboardMode = BABYLON.TransformNode.BILLBOARDMODE_ALL
GUI lacks performance, so choosing between GUI vs dynamic textures for mesh material, later is way better choice.
Setting up billboard mode with pivot for planes is far from intuitive for corner rotation pivots. Easier alternative is using “proxy” pivot plane, unfortunately that has performance drawback.
Final effect is quite pleasing but somewhat disappointing when it comes to performance. I was expecting to be able to make it work with at least 1000 labels.
I am open to any suggestions on how to make it work.
Further optimisation I can think of at the moment would be reusing graphical texture instead of creating it on the fly and only generating text. It would surely reduce initiation time and reduce memory usage.
In your first PG, what takes time is drawing the ellipsis: it seems it’s a slow operation in the 2D context of a canvas. Drawing a rectangle is much faster:
Amazing! It haven’t even crossed my mind. I suppose I could drop those elements all together, or alternatively use sprites. Thank you very much @Evgeni_Popov. Great help as always!