#Method of drawing loads of text

1 messages · Page 1 of 1 (latest)

ancient bolt
#

I want to draw a lot of data on a map (think google maps or flightradar).
My goal now is to add text to my rendered data.
ID does not change often (but IDs can get added / removed) but alt should update in real time / every couple frames.

example label:

| ID: 1234 |

Alt: 5678m

but id like to draw this for possibly thousands of objects. what methods are suitable for this?

Right now ive tried just doing draw_string * 2 per object but it takes 200fps at 1k objects.

I asked Mr. GPT and he mentioned atlas textures (which ive never heard off) and combining everything into multimeshes. but that seems to mean instancing 7 quads per object in my example. is it viable?
(ID: )(id_number)
(Alt: )(5)(6)(7)(8)

timid pendant
ancient bolt
timid pendant
ancient bolt
#

haha yeah, i was looking for a way to batch the drawing and so skipped the label method.

marsh swallow
#

Both GPT answers are nonsense afaik, those solve wildly different problems.

nimble wigeon
#

if it's only numbers you can make an "Atlas" with a texture 512x128 and the numbers from 0 to 9, then make quad meshes each UV mapped with a number and create the code to compose numbers out of that. You got draw calls for the different meshes but not for multiple textures.

#

i'm thinking you could also make a unique mesh with like 4 digits and move around the UVs, but not sure about the performance on mobile.

marsh swallow
#

I mean profile it I guess but I don't see why you'd get noticeable speed gains over just blitting the text especially given that with that approach you calculate positions per character instead of per text element

vivid prawn
#

you could also dynamically instantiate and remove Labels that are in the fustrum so that only visible ones are in memory