Optimally Rendering Billboards with Text

Hello,

I want to draw a large number of billboards with an icon and varying texts around it in a performant way on a 3D application. These billboards correspond to military symbols by definition. To make it clear, I have shared an example image and example URLs below.

mss-symbol (1)
Military Symbols on Openlayers
Military Symbols with different styles

Can you share your thoughts on the correct approach for drawing thousands of military symbols in JMonkeyEngine optimally?

My observations and ideas so far:

1- On the CPU side, I can render the icons and texts to BufferedImage to prepare the military symbols and keep them in a texture atlas. I can create a 1x1 quad as a mesh and use instancing to draw the symbols.

Disadvantages:

  1. When the texts are updated, I need to recreate the BufferedImage and update the texture atlas. This causes performance loss.

  2. I lose the flexibility to create effects like outlines, glowing on the texts, and the quality of the texts will deteriorate when scaled.

2- I can produce a texture atlas from the icons and create a bitmap for the texts. I can draw each icon and text glyph on a quad. Using batching, I can draw all of them with one draw call.

Disadvantages:

  1. The number of drawn quads will increase, which may decrease performance.
  2. It will not be as performant as the instancing technique in cases of add/remove and position update.

3- If possible, I can send the position of each billboard as a point to the geometry shader and produce quads within the geometry shader to draw the icon and text glyphs. In this method, since the mesh will be common, I think I can use the instancing method.

Disadvantages:

  1. I am not sure if this is possible. Complexity increases.
  2. Based on my research on the internet, those who used the geometry shader to draw texts found the performance insufficient.

Hi.
I would be curious to see how the final result would look if you really throw 1000 of such icons on a single screen.

As a follow up, how many of the symbols visible on the screen contains dynamic text?

As in your example posted, when zoomed out IMHO the text is not readable at all due to overdraw and when close on we are not talking anymore about thousands of symbols visible.

Tech Talk: Geometry shaders a slow for most things having more vertices then a quad. the get even slower when the vertex amount is not the same for all vertices.

Hi zzuegg,

You are right, once the number of objects exceeds 100, the objects become unreadable when zoomed out on the map. However, I still aim to be able to perform the drawing operation technically. Maybe in the future, I can add methods like turning off the texts or clustering after a certain number of graphics.

Example of 1000 icons on a single screen

In theory, the text of all symbols can change dynamically. For example, there is a modifier area that shows the world coordinates, and this modifier gets updated as the position changes.

My best guess would be a combination of baking static symbols, and text to a texture and batching the dynamic things.

There might be some shader magic possible if the text is not fully dynamic but is limited in lenght and position. Like a grid on the left/right of an icon of 50 chars and 4 lines.

Add:

After giving it a solid 6 hours of sleep i would go the baking route. It seems that its the way most maps itself are drawn so there is evidence that its one of the better ways to do it.

Thank you for your valuable opinion, zzuegg. I will work on this method and if I receive a different suggestion I will try to implement it and share my experiences.