TF2 Antialiasing (actually it's mat_mipmaptextures)

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Now that 72 hour stuff is calming down, time to ask about this problem I've been having.

I recently upgraded from a GTX 680 (4 gb) to a GTX 980 Ti (6 gb). Drivers are updated (both cards use the same ones). I'm now having some really really bad aliasing problems.

Before, my antialiasing wasn't amazing, but it was acceptable for screenshots. Now it's gone to being just absolutely horrible:

zPcFway.jpg


Other examples:

3T34uPc.jpg

7vMYXr4.jpg


These images are at full resolution, but cropped down so as not to submit people to 1920x1080 images. No rescaling.

Here's my cfg settings. These are not my original at this point; I've changed them a lot trying to get a different result but without any effect.

Code:
mat_antialias "8"
mat_aaquality "0"
mat_forceaniso "16"
mat_software_aa_quality "1" 
mat_software_aa_strength "1" 
mat_software_aa_strength_vgui "1"
mat_software_aa_blur_one_pixel_lines "0.5"
mat_software_aa_edge_threshold "1.4"

I've double and triple checked NVIDIA GeForce experience and NVIDIA control panel to make sure that the settings are "application controlled." Using the control panel to override the settings makes the antialiasing blurred somewhat, but other than that, has no effect.

Any ideas on how to fix this?
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
Did you upgrade to Windows 10 recently and also use display scaling? It handles scaling differently than previous versions of windows - I currently run TF2 at 2400x1150 to get it to be the same size it was at 1600x900 on w8.1, so it's possible (though unlikely) that w10's scaling is causing artifacts.
 

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
Did you also do a full clean install of the game (as in, deleting TF2 trough Steam, then deleting the entire Team Fortress 2 folder)? It's entirely possible some game setting is still stuck at a setting that only worked with the 680 (or worked differently with the 680).
 

PortalStorm4000

L1: Registered
Jul 22, 2016
33
10
Your video settings are not set to max, change them. It's not hard, there's nothing to complex there. If that no work, than try again. The easiest way is just make TF2 do it for you. Just go to the advanced settings and change everything to max, and if that doesn't work change delete the file and verify the game through Steam for it to give it replace it. Also, Tf2 isn't a very pretty game so keep that in mind. Gl
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Did you upgrade to Windows 10 recently

Nope, still on Win 7. Hopefully staying on 7 is not the issue.

Did you also do a full clean install of the game (as in, deleting TF2 trough Steam, then deleting the entire Team Fortress 2 folder)? It's entirely possible some game setting is still stuck at a setting that only worked with the 680 (or worked differently with the 680).

I did not. That seems a little excessive to kill everything including stuff like custom models & textures just to reset the game settings, doesn't it? Might be on to something though. I'll try wiping out the base and cfg directory and reinstalling to see if that helps after lunch.

Your video settings are not set to max, change them

...
 
Last edited:

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
I did not. That seems a little excessive to kill everything including stuff like custom models & textures just to reset the game settings, doesn't it? Might be on to something though. I'll try wiping out the base and cfg directory and reinstalling to see if that helps after lunch.
Nah, you can keep folders like materials or models (or anything in the tf/custom folder related to materials/models/particles/sound/etc).

You could copy your custom content (minus your cfgs) to another location, then delete the tf folder entirely. Don't know where Hammer settings are stored, might wanna make a backup of those as well.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Used -default to compare, which led me to the cause. Turns out it had absolutely nothing to do with anti-aliasing at all:

9gyBJ8Z.jpg


(Ignore the artifacts in the screenshots above or previously btw, I didn't save them out of PS at very high quality)

The problem had to do with one setting, and one setting alone: mat_mipmaptextures was set to 0, which caused the strange aliasing like effect. Turning this to 1 fixed the problem.

Still not sure why the GTX 680 didn't have a problem with it... maybe that card just didn't put out at high enough resolution for it to show up, or maybe it defaulted to mipmaptextures regardless of the cfg settings, or maybe I just haven't loaded a map with textures that would show this problem since before I upgraded my monitor back in April (eg, dev textures with stark lines). Either way, for the sake of future googles, this was the solution.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Bit of a followup -- using mat_mipmaptextures 1 will mean any decorated weapons (eg, Gun Mettle & Tough Break skins) will appear solid black.

I didn't notice this earlier because I've been busy this week and hadn't started up TF2 until today. So we're left with a choice:

mat_mipmaptextures 0 -- decorated weapon skins will look fine, but textures with distinct lines such as dev textures or metal sliding doors or grates or any textures that are subject to the moire effect will look terrible.

mat_mipmaptextures 1 -- black weapon skins, but the above mentioned textures will look fine.

I haven't tested specifically, but textures compiled without mipmaps will probably appear identical with either setting (likely as if mat_mipmaptextures was always 0).

I was kind of hoping my "highquality config" for TF2 that I had previously only used for screenshots would be viable as a regular playing config, but not if my weapon skins are going to be all black. We'll still need a screenshots config and a playing mode config. :p
 

I dinne ken

Has currently had enough
aa
Apr 16, 2016
324
432
If your PC can handle it, you can actually set mat_antialias to 16 and it actually works. Even though its not supported on the video settings menu.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
This is not an aliasing problem as it turns out. It's all because of the mat_mipmaptextures setting.

Maybe I should ask a mod to change the name to "TF2 Antialiasing? No - Mipmaptextures!"
 

PortalStorm4000

L1: Registered
Jul 22, 2016
33
10
Bit of a followup -- using mat_mipmaptextures 1 will mean any decorated weapons (eg, Gun Mettle & Tough Break skins) will appear solid black.

I didn't notice this earlier because I've been busy this week and hadn't started up TF2 until today. So we're left with a choice:

mat_mipmaptextures 0 -- decorated weapon skins will look fine, but textures with distinct lines such as dev textures or metal sliding doors or grates or any textures that are subject to the moire effect will look terrible.

mat_mipmaptextures 1 -- black weapon skins, but the above mentioned textures will look fine.

I haven't tested specifically, but textures compiled without mipmaps will probably appear identical with either setting (likely as if mat_mipmaptextures was always 0).

I was kind of hoping my "highquality config" for TF2 that I had previously only used for screenshots would be viable as a regular playing config, but not if my weapon skins are going to be all black. We'll still need a screenshots config and a playing mode config. :p
Hmm? You sure, whatever. it doesn't really matter to me. Good luck!
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
So this command literally enables or disables mipmaps entirely? Like, if you place a spray that uses custom mipmaps to fade in when you get close to it, does it stay visible at any distance?
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
So this command literally enables or disables mipmaps entirely? Like, if you place a spray that uses custom mipmaps to fade in when you get close to it, does it stay visible at any distance?

Seems like that's what it does, yeah. Could run a test with a vtf saved without mipmaps next to the identical vtf only saved with mipmaps and test it. I'll try to remember to do that and post results, but I'm a bit busy today.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Ok, here we go. First off, apologies, apparently it's my jpg screenshot quality setting that's not up to snuff. Noticeable artifacts in the jpg screenshots (I normally size mine down a bit anyway, so it's typically not an issue for map screenshots, but for this I left it at full resolution but cropped meaning you can spot the artifacting pretty easily).

Same texture, saved once out of PS with the VTF plugin with mipmaps (left) and without mipmaps (right). You can already see the difference in Hammer:

76bZ09e.jpg


You can see the difference in game (both screens with mat_mipmaptextures set to 1, as you can tell from the black weapon skin):

rNVbdG1.jpg

W0YodxC.jpg


You can also tell some colour weirdness going on when the mipmap transistions, but I think this my fault because I used the default settings (compressed texture, box, sharpen soft). Cubic might work better.

IPQjzpS.jpg

UFy1zNy.jpg


Comparing these pictures to my earlier ones, you can see that mat_mipmaptextures does exactly that -- it enables or disables the use of mipmapping on textures. Does that answer what you were curious about?
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
Yeah. Doesn't make it any clearer how that got turned off by itself or why turning it back on breaks other stuff. Other question, though: Does this setting reset itself back to 0 whenever you start the game? Because I've been having that issue with mat_specular lately.
 

ExtraCheesyPie

L420: High Member
Jan 29, 2015
484
151
This is not an aliasing problem as it turns out. It's all because of the mat_mipmaptextures setting.

Maybe I should ask a mod to change the name to "TF2 Antialiasing? No - Mipmaptextures!"
Unrelated (sorry) but you change change titles yourself.

go to the top of the screen > thread tools > change title
 

Uncuepa

aa
Oct 25, 2014
793
1,159
Your video settings are not set to max, change them. It's not hard, there's nothing to complex there. If that no work, than try again. The easiest way is just make TF2 do it for you. Just go to the advanced settings and change everything to max, and if that doesn't work change delete the file and verify the game through Steam for it to give it replace it. Also, Tf2 isn't a very pretty game so keep that in mind. Gl

Best laugh I've had all day
 

BenCo

L5: Dapper Member
Dec 30, 2015
242
135
Any fps boostwhen turning this off? I haven't seen this command in fps configs.
 

ics

http://ics-base.net
aa
Jun 17, 2010
841
541
So, i have fairly good card, R290 and i have mat_mipmaptextures 1. I don't see black models ingame. Except if i view them from backpack. Ingame they look just fine.