Huge lag when loading a meshwriter

This is a new problem i have run into , is that when i create and load a mesh writer the is a huge lag spike that freezes the screen. You can expirience this problem in the babylon playground too. https://playground.babylonjs.com/#PL752W#150 If you press the play button there will be a huge screen freeze/ lag spike until the text is loaded. This is the Warning i get for the lag [Violation] ‘message’ handler took 3509ms

Hi @Panosoiko and welcome to the forum

I don’t get the warning but I’m not very surprised with the time it takes: almost 1million triangles generated here.
Are you aware of a performance regression here @carolhmj ? Is there a way to change tesselation?

Looking at the documentation for it Extensions/MeshWriter at master · BabylonJS/Extensions (github.com), it doesn’t look like so, it seems dependent on font. Maybe check the MeshBuilder.CreateText function instead? It has a parameter for resolution: Creating A 3D Text object | Babylon.js Documentation (babylonjs.com)

1 Like

I do a lot of text processing. I perform my “tesselation” on the 162 glphs, actually a Blender Limited Dissolve, before export. I get 35,209 triangles on the entire “font”.

If I turn off the limited dissolve, I end up with 66,172 tris, an almost 2x increase. There is no visual difference. Even with dissolve off, I am not even close to 1 million tris. Seems like the process using meshwriter is different than Blender, which I do not know what either is.

I am trading off flexibility of changing the font in scene, but can compose the same output in about 1 milli (not counting the 4 setVerticesData() calls positions-normals-uvs & indices).


Think there might be something done, which could be changed.