Problem with font [solved]

Hi

I use a font : http://www.tutorialsforblender3d.com/GameDoc/Text/Fonts/Font_BlackChancery.tga

It has black background and white chars. Works nice.
But i also wanted to have white background and black chars. So I inverted colors.
But it doesn’t work.

Any ideas how to fix it?

Attachments

font.blend (275 KB)

Making black text is somewhat of a pain. I personally apply a material to the font object. I’ve heard someone else say they turned on lighting, then put a lamp really far away (or pointing in the other direction).

It’s best not to actually modify the image because that static at the top helps blender map the characters (or so I’m told). I can guarrentee that fiddling with it will break it though :slight_smile:

hi koto,

TheDave is right about not changing the image. And about applying a material/texture to change the text from white to black.

The way that I do it for Blender Multitexture Materials, is add the font (white text with black background) as a texture.

Go back to the Material buttons. Map Input: UV. Map To: Col button. Neg button (this inverts the black and white). And I like to use the Texture Blending mode Add instead of mix. (For GLSL I use mix.)

Material Tab: enable the Shadeless button. And because I’m using Texture Blending mode Add, I adjust the white/black contrast with the Col slider. I like to use a 0.4 value for the red, green and blue. (For GLSL I use 1.0 for red, green and blue.)

When you start the game engine it will change to black text on a white background.

Clark

Attachments

font_black_text.blend (284 KB)

Thank you guys. I’m not going to to use Text Face mode so this solution is enough.

As an alternative:
If you have white on black color font, you can change the color by changing the vertex color of the object. With that method you can even create colored text with just one font bitmap.


From left to right:

  1. Font bitmap
  2. Display in GameEngine (one black on transparent/one yellow+green on transparent
  3. Editor in Texture view and Vertex Paint mode
  4. Editor in Shaded Mode and Vertex Paint mode

I hope it helps

Hi Monster

Very interesting approach - worked for me in Texture Face mode - can it work in others ?

BTW, the font I use is the only ‘medieval’ looking one I found for blender. Unfortunately it is not well done, the letters are overlapping one another. Are there any other similarly looking fonts without this problem?

This kind of text will work in texture mode only as the font is an texture.

If the letters are overlapping on the texture you should generate a new texture image. There is a script out somewhere. Maybe this thread helps:
http://blenderartists.org/forum/showthread.php?t=95405&highlight=bfblender


Ok here it is: http://www.blendenzo.com/tutFTBlender.html
Thanks to blendenzo

When the bitmap is ok, but the letters of your text are overlapping, try to resize the text object until the distance between the letters is fine.

I hope it helps

How hard would it be to integrate freetype into the BGE?

Running back and forth with FTBlender and texturemaps is troublesome, and it never results in fonts of decent quality.