Author Topic: text distortion? (openGL)  (Read 1994 times)

0 Members and 1 Guest are viewing this topic.

Offline IRANianCha0s

  • 23
  • It's not lupus.
    • TeamCha0ticHQ
text distortion? (openGL)
I know this problem is caused by selecting any resolution other than 640x480 or 1024x768, but I was wondering if there was a way to fix it.

I usually play at 1680x1050 resolution (in OpenGL) and regardless of what settings I have (FSO and nVidia card settings), I always get text disalignment problems:


full screenshot: http://i212.photobucket.com/albums/cc135/IRANianCha0s/fs2_font_distortion-1.jpg

If you don't know what I'm talking about, look at the spaces in between words, and how there's thin lines outlining them.

Is there any fix for this?
int main(void)
{ while(1)
printf("POURING SALT ON YOUR SEGMENTATION FAULT\n");
return 0; }
http://img383.imageshack.us/img383/3369/chaos2mp1.png

 

Offline IRANianCha0s

  • 23
  • It's not lupus.
    • TeamCha0ticHQ
Re: text distortion? (openGL)
Also, just so I don't have to create another topic, I am having this problem (might be related):

http://i212.photobucket.com/albums/cc135/IRANianCha0s/fs2_misaligned_targeting.jpg

Even though I am targeting Beta 2 (I circled it red in mspaint) the targeting box is way off, and I notice it much more at higher resolutions.
int main(void)
{ while(1)
printf("POURING SALT ON YOUR SEGMENTATION FAULT\n");
return 0; }
http://img383.imageshack.us/img383/3369/chaos2mp1.png

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: text distortion? (openGL)
Are you running the latest 3.6.10 build either from the Nightly Builds or RC1/RC2?

Widescreen targeting bugs sounds like using 3.6.9 or pre-widescreen patch 3.6.10. Or a screwed up FOV setting.

For font render problems, use either "Use Large Textures" or "Fix font distortion" options on the Video tab of the launcher. Or both. They may help.

Also, this would technically fall in the FreeSpace Support Forum.

Further, for a first call support request that includes graphical bugs, knowing what video card and drivers you are using is nice to know.
As well as what version of the FSO Exe, MediaVP's, and what your launcher command line or ini settings are.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: text distortion? (openGL)
The font rendering problem is known, and believe it or not, what you see there is actually the fixed code.  The problem with text used to be far worse than it is in that screenshot.  There is little hope of getting it better than it is now, simply due to how it all works.  Perhaps someone will come up with a code fix that does improve things a bit some day, but I wouldn't count on it.

Depending on how old your build is, upgrading to something current may help however.  Various small improvements were made early last year which did improve things a little bit from the previous fixes so maybe it would be less of an issue (though not gone completely) in newer build.


For font render problems, use either "Use Large Textures" or "Fix font distortion" options on the Video tab of the launcher. Or both. They may help.
"Use Large Textures" only ever worked in retail, it hasn't done anything in FSO for 5-6 years (or more).  And "Fix font distortion" was a D3D hack and doesn't do anything in OpenGL.

 

Offline IRANianCha0s

  • 23
  • It's not lupus.
    • TeamCha0ticHQ
Re: text distortion? (openGL)
I used Turey's installer at fsoinstaller.com over a fresh installed copy of FS2, my graphics card is an nVidia GeForce 8800 GTS.

I was wary about using the 3.6.10 exe, not being official and all, but that seems to have fixed the targeting problem, thanks.

Taylor, I appreciate the info, and I was wondering if anyone has found out exactly where that font problem is coming from? Also, is it only with certain hardware, or if there's a specific location in the source code that is related to it...?
int main(void)
{ while(1)
printf("POURING SALT ON YOUR SEGMENTATION FAULT\n");
return 0; }
http://img383.imageshack.us/img383/3369/chaos2mp1.png

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: text distortion? (openGL)
Taylor, I appreciate the info, and I was wondering if anyone has found out exactly where that font problem is coming from? Also, is it only with certain hardware, or if there's a specific location in the source code that is related to it...?
The font is basically just one 256x256 texture with all of the letters sitting next to each other.  So the lines that you are actually just other letters in the font texture.  At the standard resolutions (640x480, 1024x768) it uses the UV values directly in order to draw each letter without seeing any others.  But when you are using a non-standard resolution it does various scaling on the values introducing a precision problem in the UV coords.  Add texture filtering to that and it's extremely difficult to not see some excess pixels from neighboring letters.

Technically this can be fixed however: 1) add all of the necessary data to a VBO, 2) convert each string of text into an index buffer, 3) use a scaling matrix to accurately change the size, 4) render.  Unfortunately that represents quite a few code changes just to get working and would require considerably more changes to be made all over the code in order to negate the performance hit you would get from doing so much work to render any little bit of text (not that it's terribly efficient now :().

  

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: text distortion? (openGL)
For some reason, this was a very common issue in general at the time FS2 was released. I remember seeing a lot of games around the late 1990s having various cutoff problems with the text and you had to experiment with command line switches to fix it. As Taylor said, FS2's text used to look much worse at one point.