TF2 Antialiasing (actually it's mat_mipmaptextures)

Discussion in 'Team Fortress 2 Talk' started by EArkham, Jul 31, 2016.

  1. EArkham

    aa EArkham Necromancer

    Messages:
    1,568
    Positive Ratings:
    2,185
    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:

    [​IMG]

    Other examples:

    [​IMG]
    [​IMG]

    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?
     
  2. Idolon

    aa Idolon the worst admin

    Messages:
    1,511
    Positive Ratings:
    4,332
    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.
     
    • Thanks Thanks x 1
  3. Vel0city

    aa Vel0city func_fish

    Messages:
    1,909
    Positive Ratings:
    1,530
    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).
     
    • Thanks Thanks x 1
  4. PortalStorm4000

    PortalStorm4000 L1: Registered

    Messages:
    33
    Positive Ratings:
    8
    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
     
    • Funny Funny x 2
  5. EArkham

    aa EArkham Necromancer

    Messages:
    1,568
    Positive Ratings:
    2,185
    Nope, still on Win 7. Hopefully staying on 7 is not the issue.

    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.

    ...
     
    Last edited: Jul 31, 2016
  6. Vel0city

    aa Vel0city func_fish

    Messages:
    1,909
    Positive Ratings:
    1,530
    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.
     
    • Thanks Thanks x 1
  7. EArkham

    aa EArkham Necromancer

    Messages:
    1,568
    Positive Ratings:
    2,185
    Used -default to compare, which led me to the cause. Turns out it had absolutely nothing to do with anti-aliasing at all:

    [​IMG]

    (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.
     
    • Thanks Thanks x 1
  8. EArkham

    aa EArkham Necromancer

    Messages:
    1,568
    Positive Ratings:
    2,185
    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
     
  9. I dinne ken

    aa I dinne ken

    Messages:
    145
    Positive Ratings:
    165
    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.
     
  10. EArkham

    aa EArkham Necromancer

    Messages:
    1,568
    Positive Ratings:
    2,185
    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!"
     
    • Agree Agree x 1
  11. MaccyF

    aa MaccyF Notoriously Unreliable

    Messages:
    903
    Positive Ratings:
    1,458
    pinging @The Jill

    would be great if you could take a look at this
     
    • Agree Agree x 2
  12. PortalStorm4000

    PortalStorm4000 L1: Registered

    Messages:
    33
    Positive Ratings:
    8
    Hmm? You sure, whatever. it doesn't really matter to me. Good luck!
     
  13. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,217
    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?
     
  14. EArkham

    aa EArkham Necromancer

    Messages:
    1,568
    Positive Ratings:
    2,185
    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.
     
  15. EArkham

    aa EArkham Necromancer

    Messages:
    1,568
    Positive Ratings:
    2,185
    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:

    [​IMG]

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

    [​IMG]
    [​IMG]

    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.

    [​IMG]
    [​IMG]

    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?
     
    • Thanks Thanks x 1
    • Like Like x 1
  16. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,217
    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.
     
  17. ExtraCheesyPie

    ExtraCheesyPie L7: Fancy Member

    Messages:
    484
    Positive Ratings:
    127
    Unrelated (sorry) but you change change titles yourself.

    go to the top of the screen > thread tools > change title
     
  18. Uncuepa

    aa Uncuepa

    Messages:
    770
    Positive Ratings:
    1,025
    Best laugh I've had all day
     
    • Agree Agree x 2
  19. BenCo

    BenCo L5: Dapper Member

    Messages:
    242
    Positive Ratings:
    161
    Any fps boostwhen turning this off? I haven't seen this command in fps configs.
     
  20. ics

    aa ics http://ics-base.net

    Messages:
    664
    Positive Ratings:
    412
    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.