Text Rendering Alternatives?

Hi, started using BabylonJS a few months ago and love it so far. Will be sharing my project here once it’s a little further along.

I’m looking for ways to render text. I’m currently using the standard “GUI” approach, which is fine, but really crushes performance if updated often. I have lots of game stats that need to update every frame, and doing so with GUI text brings the absolute framerate down from ~1500 to ~30, so not ideal.

I don’t need anything fancy, just a transparent rectangle with text on it that I can move around in 3D space. In the past, I’ve used tools that render a font into a texture, then used a custom shader to set the right UV coordinates to get the character I want. Anything like that available for BablyonJS or do we have to do it manually?


Welcome aboard!

Using a font texture and a custom shader is probably the fastest if you don’t need what all the GUI provides.

Maybe this link can help: Draw high number of texts fast?

Thanks, I did look through that thread and didn’t see any great solutions, unless maybe I missed something.

I also found this thread: 3D text in Babylon - Announcements - Babylon.js

That would be a nice solution but there doesn’t appear to be any way to change the text once it’s created. And doing a “new Writer” on every frame seems like a very bad idea.