Generating Realtime Font Textures With FTBlender(Linux and Windows only)
by blendenzo with special thanks to Social
FTBlender.zip (Windows, 129kb zip)
FTBlender.tar.gz (Linux, 130kb, requires Wine)
The Blender Game Engine uses special font textures to display realtime text. Unless someone else has already converted the font you plan to use, you'll need to generate your own textures. This can be easily accomplished with a handy little program called FTBlender. Let's run through a quick example to get the hang of it.
To begin, download the appropriate FTBlender file from above and extract it to its own directory. The FTBlender directory will contain a .blend and an .exe. Place the truetype fonts you wish to convert in the FTBlender directory, then open the .blend directly (by double-clicking the filename, that is). It's important to open the file directly, since Blender might not look for the fonts in the correct directory if you open the file from Blender.
In Blender, you will see a Text Editor window with a Python script written in it. Simply press [Alt+P] to run the script, and a new window will pop up with an image of the first font in your directory. Press [F1] to see a list of commands in the FTBlender program. Press [F2] to save the font as a .tga file. Once you're done with a particular font, press [Esc] to cycle to the next one in line. You can have a copy of the font texture I made while writing this tutorial. Charaille for BGE (44kb).
You may find that the default settings in the .blend don't give the results you desire. If that is the case, you can simply change the system command in the Python script. I've included a handy list of available command line flags in the .blend so that you can know what you're doing. That about wraps it up. Feel free to contact me if you have any questions.
Back to the tutorials index...
Website design by Tony "blendenzo" DiRienzo. All content is copyrighted to its respective author.