So as many of you are aware, Mabinogi's text rendering is.... unusually slow.
It's slow to the point that a portion of the lag people experience when in an area with lots of players (shopping areas, combat events, GM events, etc.) is actually from the name display. Hitting CTRL+N can raise your FPS by 15% or more in these situations. And let's not forget about the client lag that happens when you go to pull up your chat log, and the more that's in it the more you lag when pulling it up.
Hell, a large number of players mod the game for "bitmap" fonts, causing the game to fall back on an older/simpler font rendering method that's faster. So why is Mabinogi's text so slow to pull up (lag when opening the chat log) and render (FPS)?
- Explanation
Turns out that Mabinogi, when using the default text routines, actually... creates 3D models out of each letter to use for text rendering, in every word, when it prepares text for display. I wish I was kidding.
The reason that you lag when bringing the chat log up (or other things like it) is because when you do that it reads all the text that should be in that interface and then generates the models out of the font. It then uses those generated models as the text display. You can actually have the text modes mixed, 'cause it will use the models that it's generated until it thinks it needs to free them (if you close that window/interface) or re-render them if you resize the window.
So here's the normal font rendering (with a custom font), normal and then wireframe.
[Image: http://s9.postimg.org/y4ow5t463/mabinogi_2015_10_24_007.jpg]
[Image: http://s9.postimg.org/l337fyfrv/mabinogi_2015_10_24_008.jpg]
And here's the same scene with the commonly-used bitmap font mod.
[Image: http://s9.postimg.org/cgzxvd3rv/mabinogi_2015_10_24_009.jpg]
[Image: http://s9.postimg.org/mtm8hfxaz/mabinogi_2015_10_24_010.jpg]
[spoiler="Gif Comparison"]Normal
[Image: http://s22.postimg.org/ped8jo3a9/normal.gif]
Bitmap
[Image: http://s22.postimg.org/7n1m57nvl/bitmap.gif]
[/spoiler]So what the bitmap font rendering does is it still generates a 3D object for the individual letters, but every single one is a rectangle, just 2 polygons (that presumably hold the letter as a texture) versus the large variable amount of other characters. It's still not perfect (should either be one rect per rendered portion or some sort of texture overlay depending on the game), but I can see how it's faster since it makes relatively less-complex text.
- Conclusion
I'm gonna' go cry in a corner for the state of this game engine now.