[2.1] Making text look god in Overlays Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
gabbsson
Halfling
Posts: 65
Joined: Wed Aug 08, 2018 9:03 am
x 9

[2.1] Making text look god in Overlays

Post by gabbsson » Wed Jun 19, 2019 9:26 am

Hello!

I'm fine-tuning my 2D-Text-with-3D-position for a project and I am realizing the text feels kinda low res, as in not sharp/crisp.

Are there any tricks to make sure text looks good in Overlays?
I remember using a higher font size and then down scaling the geometry (a sprite in this case) when I was using XNA + C#. Not sure if something similar is possible with overlays? I've only gone as far as to check if there is a setScale (also tried setting the width/height but it did nothing).

I have messed around with the trueTypeSize and trueTypeResolution but since my font sizes are "normal" this doesn't really change much.

I'd appreciate any tips!

Cheers
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 873
Joined: Sun Mar 30, 2014 2:51 pm
x 176
Contact:

Re: [2.1] Making text look god in Overlays

Post by paroj » Wed Jun 19, 2019 11:14 am

increasing trueTypeResolution should usually do the trick
0 x

gabbsson
Halfling
Posts: 65
Joined: Wed Aug 08, 2018 9:03 am
x 9

Re: [2.1] Making text look god in Overlays

Post by gabbsson » Wed Jun 19, 2019 1:00 pm

paroj wrote:
Wed Jun 19, 2019 11:14 am
increasing trueTypeResolution should usually do the trick
I was about to reply that I tried that, but I tested it again now (I was at 128 but increased to 256).
Surprisingly it actually seems to look worse.
So instead I tried to decrease it to 64 and it actually looks better than before.
I tried to add an example screenshot of the two but the difference is quite small... Still doesn't make sense to me however.

So for now I am using trueTypeResolution - 64, trueTypeSize - 26

Are those values good/typical?
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 873
Joined: Sun Mar 30, 2014 2:51 pm
x 176
Contact:

Re: [2.1] Making text look god in Overlays

Post by paroj » Wed Jun 19, 2019 1:19 pm

  • trueTypeSize is the point size of the font as you would choose in e.g. Word.
  • trueTypeResolution should match the dpi resolution of the screen, given that the text occupies trueTypeSize dots after projection (i.e. in screen space).
also note that mipmapping is disabled for font textures, which means that you get aliasing if you set dpi too high (conversely it gets blurry if dpi is too low).
0 x

gabbsson
Halfling
Posts: 65
Joined: Wed Aug 08, 2018 9:03 am
x 9

Re: [2.1] Making text look god in Overlays

Post by gabbsson » Wed Jun 19, 2019 2:22 pm

paroj wrote:
Wed Jun 19, 2019 1:19 pm
  • trueTypeSize is the point size of the font as you would choose in e.g. Word.
  • trueTypeResolution should match the dpi resolution of the screen, given that the text occupies trueTypeSize dots after projection (i.e. in screen space).
also note that mipmapping is disabled for font textures, which means that you get aliasing if you set dpi too high (conversely it gets blurry if dpi is too low).
That makes sense. Thank you!
0 x

Post Reply