Text Object Resolution

The addition of the ability to use text objects rather than manually setting up texture fonts is useful, but I’ve noticed that the text is rendered at an extremely low resolution (note the barely-legible font next to the cursor)



This is coming from a vector font, so the issue is not with the font file itself (the problem is present no matter what font I use)
If I scale up the text the resolution increases, so it appears the pixels are a set size in relation to world units.

So the question is, is it possible to increase the resolution of text objects in the game engine? Is there a setting I’ve missed, or something?

Should’ve done a forum search as well as a google search. If this comes up in anyone else’s search, the python property you’re looking for is

textObject.resolution

. Defaults to 1, you’re gonna want a lot higher than that (6 to 8 seemed about right to me)

Im not developer dedicated to text rendering but I dont think that that text is vector. It seems to me as if it was only converted from vector to bitmap when the engine starts…
Anyway, it might not be hard to let user set the game text resolution somwhere if Im not wrong… maybe my first C++ project related to blender? :slight_smile: I will look into it tommorrow.

EDIT: I think I found the resolution thing :slight_smile: not sure how to make changes now, but at least I will play a bith with this.

Please, if any more experienced developer would advice me, how to add a variable that user can change into UI, I would be very thankful :slight_smile:

I did some tests, and it’s converted to bitmap as the game is running- if you resize the text while the game is running (with an IPO, for example) the resolution changes (and the framerate takes a massive dive)

Thanks for the heads up.
I have discovered more about the resolution. It seems that resolution of text is not dependent on text size, so the smaller you make the text, the worse will be the resolution. If im talking nonsense, please correct me :slight_smile: its late night already.

I may do a bug report about this, thats why i am still using the old bitmap fonts or blf module

EDIT: does the settings in “text object -> object data” even do something?
EDIT2: damn, i have blender 2.63 on linux :smiley: not sure if what I was writing is still true… sorrry

As far as I can tell the only settings in the object data panel that do anything in-game are the size and font selections in the font options, and the X and Y offset in the paragraph options.

A forum search would have been helpful, as this has come up once or twice in the past. In any case, you can use a script to change the resolution of text objects.



from bge import logic

cont = logic.getCurrentController()

obj = cont.owner

obj.resolution = 8


Whoops, I did a google search and forgot to do a forum search on top of that. Thanks!