3D text in Babylon

If you need to create 3-D text in Babylon meshes, I recommend the extension Babylon Meshwriter. It is well-documented here: Extensions/MeshWriter at master · BabylonJS/Extensions · GitHub

It mostly supports Helvetica but I have added a couple other fonts I use . . . and some crazy symbols.

18 Likes

Very cool!

Excellent !!!

How to customize font files?

How to convert woff into font files?

How about Arial… As that is the default Unity Text Mesh font…

I am trying to use your MeshWriter extension in the Babylon Toolkit Core Libs. And Arial is the default font… Would be nice to add default ‘Arial’ 3D Text Mesh support to Babylon Toolkit :slight_smile:

Unless you are an artisan, Helvetica Neue is Helvetica is Arial. At least to my eye.

I picked that for the bestest firstest support from MeshWriter since it is essentially “vanilla” for Web pages.

Yang Liu, I don’t know about .woff files, sorry.

I have used .ttf and .otf files as sources. I am updating the documentation for creating a new font here: meshwriter/fonts at master · briantbutton/meshwriter · GitHub

If you don’t mind, please direct further questions to this thread: Adding a new font for MeshWriter

That will reduce repetition.

2 Likes

thank you. I can customize fonts myself now.

@yang_liu, well done!! It is hard. I salute you.

I am working a utility to automate more of this. May I ask what font(s) you wanted added?

I am from China. As you know, the size of Chinese font file is very large, about 10MB each, for example, Microsoft YaHei, SimSun, SimHei and so on.
I think if your automate program can handle chinese font file, others will be very simple.
Meshwriter is an amazing extension.

2 Likes

Auto font conversion is here. It is pretty simple and very fast. See this repo. I have not yet documented how to create a minified MeshWriter build with your new fonts but I will get to this presently.

It looks like a miracle (to me) .ttf file goes in, JavaScript file comes out. MUCH of the magic is in opentype.js. Bless them!

5 Likes

It’s nice as an extension.
The accents does not work very well.

There is only ‘é’ that works.
those do not work: è, à, ù, ê, ç, ï

https://www.babylonjs-playground.com/#PL752W#38

Thank you for this extension. Can all font be supported for the default font and Comic? @TheLeftover

2 Likes

It has been done. For Helv only. Not Comic. I will look at Comic later.

https://www.babylonjs-playground.com/#PL752W#45

3 Likes

Supplemental note. The whole module with:
~ Comic: Basic glyphs
~ HirukoPro: Basic glyphs
~ Jura: Basic glyphs
~ Helvetica Neue: Comprehensive glyphs

is only 115K bytes.

1 Like

Thank you very much.
HirukoPro seems to take into account the accents also with Hlvetical. :smiley:
There remains only Jura and Comic who does not take any accent. When do you plan to take charge for Jura and Comic ?
Your extension works well otherwise. Thank you for sharing.

Hi @TheLeftover,

I’m still waiting for your answer to know when do you want to take over accents for Jura and Comic ?
Also, the webgl-dings font does not work at all.

https://www.babylonjs-playground.com/#PL752W#47

Thank you in advance

Sorry, I didn’t know it was urgent.

Right now, I have no plans to extend Jura beyond the basic set. That is a function of usage. I use Jura to show, numbers, dates, URLs, file names, etc. If you are using it more broadly, I would like to hear about that. I am very interested in how applications are using MeshWriter.

I will fully extend Comic but I would expect it to take about four weeks.

Why so long? A bit of background. File size is important. Although it is now easy to slap new fonts into MeshWriter, it adds to the size for everyone. There are two ways to add the extended glyphs to MeshWriter. The automatic way adds about 50K bytes (for Comic). The manual way adds only about 10K bytes. I am going manual.

Also, this is a volunteer activity and fits behind my other duties.

Hope this helps.

This is not so urgent, my application is under development. I use it to offer the users the fonts available in my metaverse editor.

But I can wait. I just wanted to know your plans

Thanks!

1 Like