project-navigation
Personal tools

Author Topic: Blurry textures?  (Read 6288 times)

Offline TumbleWeed

  • Rookie
  • ***
  • Posts: 12
    • View Profile
Blurry textures?
« on: July 07, 2010, 11:52:10 pm »
Is it just me or are the textures blurrier than in the previous release(s)? Specifically the weapon and outfit textures. I remember them being much clearer and sharper. It's been a long time since I last played though.
http://img17.imageshack.us/img17/5590/blurry.gif

That's with texture reso cap set to Extreme (or the one before that), LOD enabled, texture compression disabled, monitor reso at 1680x1050, with 7900GT card in the case and latest drivers.
IMO, it shouldn't look that ugly (blurry).

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Blurry textures?
« Reply #1 on: July 08, 2010, 12:16:16 am »
You will have to play 1024x768 in a window to get the sharpest version of UFO:AI @ the moment...  ;)

Offline Barleyman

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Re: Blurry textures?
« Reply #2 on: August 07, 2010, 01:55:13 am »
You will have to play 1024x768 in a window to get the sharpest version of UFO:AI @ the moment...  ;)

That a fact with 2.3? You're saying the game is actually running at a fixed resolution and it's scaled..

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Blurry textures?
« Reply #3 on: August 07, 2010, 10:24:39 am »
That a fact with 2.3? You're saying the game is actually running at a fixed resolution and it's scaled..

Yes.

-geever

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Blurry textures?
« Reply #4 on: August 07, 2010, 12:27:45 pm »
The GUI is scaled, but not the 3D rendering of the geoscape and battlescape, correct?

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Blurry textures?
« Reply #5 on: August 07, 2010, 01:29:06 pm »
The GUI is scaled, but not the 3D rendering of the geoscape and battlescape, correct?

Yes. Maybe I was not exact enough. Whenever another resolution than 1024x768 is used Menus & GUI are up- or downscaled which results in blurry GUI & menu gfx.
Ofc. 3d vectors on battlescape & geoscape are always rendered at the selected resolution, but still we have some other scaling issues with the textures also, but afaik those are not related to the fixed resolution stuff (IIRC trilinear texturing is turned off by default, high resolution textures are used 'too late' or at very high zooms only).

Why I wrote that 1024x768 in a window will show the sharpest version is not only related to the GUI & menu stuff, but also related to scaling behaviour of modern TFTs, so if you play 1024x768 fullscreen on a 1680x1050 TFT-Monitor, the monitor will scale that resolution to its native resolution & the result will be unsharp again also for the 3d graphics & textures... (I think this is also what Geever meant)

But this behaviour has nothing to do with UFO:AI's rendering & scaling behaviour, but with the fixed pixels & native resolutions of TFTs & you will have no problem with bad scaling if you use a CRT-Monitor, which will show you sharp 3d gfx @ any resolution...

I'm confident that the blurry textures rendering issue will be fixed soon also...
« Last Edit: August 07, 2010, 02:07:37 pm by MCR »

Offline Barleyman

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Re: Blurry textures?
« Reply #6 on: August 07, 2010, 09:47:44 pm »
Yes. Maybe I was not exact enough. Whenever another resolution than 1024x768 is used Menus & GUI are up- or downscaled which results in blurry GUI & menu gfx.
Ofc. 3d vectors on battlescape & geoscape are always rendered at the selected resolution, but still we have some other scaling issues with the textures also, but afaik those are not related to the fixed resolution stuff (IIRC trilinear texturing is turned off by default, high resolution textures are used 'too late' or at very high zooms only).

So is there a way to turn trilinear filtering on and tweak the mipmapping settings?

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Blurry textures?
« Reply #7 on: August 08, 2010, 03:06:15 pm »
So is there a way to turn trilinear filtering on and tweak the mipmapping settings?

Yes. We just have not integrated the possibility to change them inside the options menu. To change the settings:

Open the console & enter set r_texturemode GL_TEXTUREMODE

Possible GL_TEXTUREMODE settings are:

GL_NEAREST
GL_LINEAR
GL_NEAREST_MIPMAP_NEAREST
GL_LINEAR_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_LINEAR

Barleyman, please report your findings here, because I did not have time to test all of those extensively & your results could help many other players also.

Happy testing  ;D

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Blurry textures?
« Reply #8 on: August 08, 2010, 03:53:17 pm »
Code: [Select]
static const glTextureMode_t gl_texture_modes[] = {
{"GL_NEAREST", GL_NEAREST, GL_NEAREST}, /* no filtering, no mipmaps */
{"GL_LINEAR", GL_LINEAR, GL_LINEAR}, /* bilinear filtering, no mipmaps */
{"GL_NEAREST_MIPMAP_NEAREST", GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST}, /* no filtering, mipmaps */
{"GL_LINEAR_MIPMAP_NEAREST", GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR}, /* bilinear filtering, mipmaps */
{"GL_NEAREST_MIPMAP_LINEAR", GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST}, /* trilinear filtering, mipmaps */
{"GL_LINEAR_MIPMAP_LINEAR", GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR} /* bilinear filtering, trilinear filtering, mipmaps */
};

see the comments to find out which is trilinear filtering and so on - will make "soon" into the video menu (once MCR found the time ;) )

Offline Barleyman

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Re: Blurry textures?
« Reply #9 on: August 08, 2010, 10:40:09 pm »
Hm.

I do assume these commands have to go into the config.cfg.

In any case, trilinear is possibly a little crisper but it's hard to say for certain as you do not allow saving during tactical and I don't know how to implement the change immediately. So no head-to-head comparison is possible.

Changing r_texture_lod to "0" does make things a lot crisper as it effectively disables mipmapping. That's not a happy place, thought, silent storm for example wasted piles of resources by not implementing LOD which they masked by gluing camera near ground.

So for more crispy experience I suppose GL_NEAREST_MIPMAP_LINEAR or GL_LINEAR_MIPMAP_LINEAR would give best result if you tweak the level of detail to use sharp textures much farther away than happens now (you can see how small the sharp area is from the ground)

Ed: I figured how to restart renderer (vid_restart) but that resets back to main menu and starting next mission tends to make UFO:AI hang on you.
« Last Edit: August 08, 2010, 10:45:11 pm by Barleyman »