Jump to content
The Dark Mod Forums

TDM Devbuild AA discussion


MirceaKitsune

Recommended Posts

Hope I'm not being too off-topic for this thread, but I was playing a lovely new FM and something I saw reminded me of another reason why I hate MSAA apart from bad performance: It doesn't even always do the job right, including (but not limited to) to fixing pixel-sharp patterns on textures.

seeking(2023-06-2802-57-59)(-5144.79-1249.39-249.75).thumb.jpg.fccd6a76fabaa4a11f81514633901ff8.jpg

Zoomed in for a close look and to catch a good example, see at full res. Seems to be the bumpmap in this case. Possibly caused by the texture being so high-res it surpasses the screen resolution so there's no blurring any more?

I set MSAA to 4x and it didn't affect it. Which makes sense since I'm sure it only handles geometry and has no concept of textures. It would further be great if we had an alternative form of AA, which weren't just cheaper than MSAA but also handled sharp pixels on textures including alpha edges alongside geometry edges: Right now I think we have no fix to that grain.

  • Like 1
Link to comment
Share on other sites

Like AluminumHaste said MSAA is for edge of geometry/polygons, if you want to affect textures/shaders/transparencies, you need to use a post-process AA like TAA (it will blur the scene a little contrary to old school MSAA thou).

You can use Reshade for TAA. 

Ops: MirceaKitsune sorry you already knew msaa was for geometry only, didn't read your reply well sorry...

Edited by HMart
Link to comment
Share on other sites

32 minutes ago, HMart said:

Ops: MirceaKitsune sorry you already knew msaa was for geometry only, didn't read your reply well sorry...

It's okay. Just yeah made me wonder if any of the alternate AA types could also handle sharpness in textures, so we can taclke geometry and texture aliasing in one go seeing we get both. Given the reasons mentioned to not use FXAA and other mainstream ones, I'm wondering if we may want to create our own AA post-processing shader for TDM's specific needs, given we need both something attuned for performance and various sharpness scenarios.

AFAIK the Linux amdgpu driver offers no way to enable those universally: I believe some users said they can enable FXAA in their driver settings, but that's probably AMD Catalyst or Nvidia on Windows. Never tried reshade but heard about it.

Link to comment
Share on other sites

ReShade has NOT access to frame queue and motion vectors, so no "true" TAA possible (but there are motion vectors estimation techniques: GitHub - JakobPCoder/ReshadeMotionEstimation: Optical Flow for games in realtime )

Only FXAA/SMAA/CMAA (Intel), etc.

10 years ago they were called "morphological AA"

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

On 6/28/2023 at 10:43 PM, lowenz said:

ReShade has NOT access to frame queue and motion vectors, so no "true" TAA possible (but there are motion vectors estimation techniques: GitHub - JakobPCoder/ReshadeMotionEstimation: Optical Flow for games in realtime )

Only FXAA/SMAA/CMAA (Intel), etc.

10 years ago they were called "morphological AA"

oh I didn't knew that, I just seem to recall Reshade having a TAA like shader but I most be wrong then.

Link to comment
Share on other sites

On 6/28/2023 at 11:24 AM, MirceaKitsune said:

Hope I'm not being too off-topic for this thread, but I was playing a lovely new FM and something I saw reminded me of another reason why I hate MSAA apart from bad performance: It doesn't even always do the job right, including (but not limited to) to fixing pixel-sharp patterns on textures.

seeking(2023-06-2802-57-59)(-5144.79-1249.39-249.75).thumb.jpg.fccd6a76fabaa4a11f81514633901ff8.jpg

Zoomed in for a close look and to catch a good example, see at full res. Seems to be the bumpmap in this case. Possibly caused by the texture being so high-res it surpasses the screen resolution so there's no blurring any more?

I set MSAA to 4x and it didn't affect it. Which makes sense since I'm sure it only handles geometry and has no concept of textures. It would further be great if we had an alternative form of AA, which weren't just cheaper than MSAA but also handled sharp pixels on textures including alpha edges alongside geometry edges: Right now I think we have no fix to that grain.

What mission is this? I'll take a look at the texture in question.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

25 minutes ago, AluminumHaste said:

What mission is this? I'll take a look at the texture in question.

Spoiler

Seeking Lady Leicester. It was in the spirit world, I believe on the little floating island with a stone and some greenery on it.

 

Link to comment
Share on other sites

On 6/28/2023 at 9:05 PM, MirceaKitsune said:

I believe some users said they can enable FXAA in their driver settings, but that's probably AMD Catalyst or Nvidia on Windows.

You can set FXAA in the nvidia linux driver settings. Then you have to disable AA in tdm settings. Since it's an nvidia tech, I understand you cannot set it in the amd driver settings.

Link to comment
Share on other sites

It's not NVidia only, AMD just has its own spin (Morphological AA) since 2011.

FXAA was created for consoles starting from Foliage AA techniques seen in Crysis in 2007 (edgeAA) as a performance oriented form of AA (old consoles can't handle MSAA)

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

11 hours ago, MirceaKitsune said:
  Reveal hidden contents

Seeking Lady Leicester. It was in the spirit world, I believe on the little floating island with a stone and some greenery on it.

 

Can you go into the game and type 'getviewpos' into the console and paste the output here?

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Where did the rest of the replies go?

EDIT: It's a TGA normalmap, no mipmaps, so you might get shimmering or other texture artifacts when you move away from it, or if it's used on a really small object like in this case.

  • Like 1

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

On 6/30/2023 at 10:28 AM, datiswous said:

You can set FXAA in the nvidia linux driver settings. Then you have to disable AA in tdm settings. Since it's an nvidia tech, I understand you cannot set it in the amd driver settings.

to add to what lowenz said MLAA from AMD is generally considered better than FXAA on AMD hardware, for obvious reasons, so if you have one, is better to use that instead of FXAA. But unfortunately many games only implement FXAA, and forcing it on the GPU driver smooths everything on screen, including the text and GUI elements, that is not generally what you want. That happens the same with FXAA forced on the nvidia drivers...

But today IMO is better to forget FXAA and MLAA and support/use SMAA (Enhanced subpixel morphological antialiasing) that is a updated version of MLAA.

Edited by HMart
Link to comment
Share on other sites

MLAA and SMAA have one big problem FXAA doesn't have: they morph straight lines.....into something like ~

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

So some clarification: This thread branched off from my post in the general devbuild thread, some of my replies didn't get moved with it... sorry again for not noticing the move in time! Here's my reply with the viewpos for that texture.

I gave my take on why I think we need shader based anti-aliasing in TDM: MSAA is still very expensive despite recent improvements, even at 4x you're going to lose at best 10 to 20 of your precious FPS. Making matters worse, it addresses only sharp edges caused by geometry, MSAA can't do anything about sharpness in alpha textures... in fact even geometry around sharp areas like lamps doesn't get smoothed out properly.

seeking(2023-06-2918-11-39)(1572.012756190.25).thumb.jpg.a01847970922eb20e38e30ee36e037e8.jpg

I proposed FXAA, TAA, SSAA, etc. In another post Stgatilov made good points on why those have their own issues. This left me wondering if we may want our own custom AA shader, fit for TDM and idTech 4's specific needs... the devs best know the answer to that question. I can only say that as a player, I definitely feel we need a cheaper and all-encompassing solution to pixel-sharp edges produced under various circumstances, don't know enough to do more myself.

Edited by MirceaKitsune
Link to comment
Share on other sites

I don't think anyone's going to just randomly come up with a better alternative to SMAA. That would take serious knowledge of this particular domain and probably a lot of research and experimentation.

TDM is not currently in a state where we can implement TAA well, because good modern variants (including FSR 2) require motion vectors, and we cannot currently create proper motion vectors. Even then, it is by far the most complicated technique to implement well.

So, realistically, that leaves FXAA or SMAA. Personally I think FXAA is terrible and not much more than a glorified blur filter and would be a complete waste of effort. SMAA is at least ok in some sense, though for me absolutely not a replacement for MSAA.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@MirceaKitsune 

I don't say this to be discouraging, but a developer has already responded that replacing the AA in the game is not arbitrary and has no ETA so not sure what else you are looking for? 

Even if the engine is overhauled to the point TAA is an option, there is still no perfect AA solution. The image quality of the most modern games often reveals shortcomings under scrutiny - there are always trade offs.

So how helpful is your suggestion which paraphrased is basically: "we need a bespoke AA solution that cheaply provides perfect results" when it comes to actually solving this problem?

In a game where the image is typically dark and there isn't much high frequency detail it does not take much AA to provide an acceptable image in 95% of circumstances imo.

It is we mappers who ultimately control what you are seeing in a given mission, and these scenes in SLL are very brightly lit with large volumetric light volumes. This for example reveals a lot of limitations in the resolution of shadow maps for these lights and presents normal map interactions that are not typical for the game, all that were quite obvious in development. Ultimately we liked the overall effect, so we accepted the trade offs.

While there will always be room for improvement and advancements (just look at the VL light quality improvements coming from 2.10 to 2.11) it is that overall presentation, including those compromises, that is what real time game art is all about.

  • Thanks 1

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

I think the new thread started from me posting about a sharp texture, I didn't understand what was causing it to be pixel-grainy, it was later clarified that lack of mipmaps can do that. I suspected it might be a common occurrence and combined that with the same happening to sharp edges. Hence me wondering if a solution to address all such artifacts can exist.

Personally I think FXAA would be an improvement, but if the other devs feel it would look ugly I understand that. I don't agree the issue isn't noticeable due to darkness, I tend to notice it a lot and look for ways around it. I understand an easy solution isn't possible now, like I said the thread branched as I posted about a sharp texture error which I misunderstood as being related to (texture) AA in some form.

Link to comment
Share on other sites

As other users have pointed out it's at least as much if not more an art "problem" as it is a technology one. While I could definitely see mipmaps helping, as I have mentioned I am not aware of any normal maps in core assets which are compressed and leverage mipmaps. I think it comes down to the overall intensity and then the frequency of detail in the normal map relative to the scale of the texture and lighting in the scene.

The art of the game was made to suit the technology of the game. This means the intensity of the normal maps in many stock assets are tuned to present detail from small often transient dynamic lights and they do not hold up as well under these kinds of lighting conditions or when used outside of their intended texture scale. This one is probably intended to be a large stone floor which is probably lit by a torch instead of small platforms lit by giant spotlights.

This was within our power to "fix", but we didn't consider it a priority admittedly in the context of all the work to be done to finish and release the mission.

  • Like 2

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

On 7/2/2023 at 9:08 PM, lowenz said:

MLAA and SMAA have one big problem FXAA doesn't have: they morph straight lines.....into something like ~

MLAA has a bad tendency to smooth text indeed but imo SMAA is better than that, specially at x2 or above.

This is what Unity docs say about it.

Quote

is higher quality than FXAA, but slower. It doesn't require motion vectors either, but is not compatible with mobile devices or XR. Depending on the visual style of your project, SMAA can match the quality of TAA.

Is all a matter of opinion but if is good for Unity is good for TDM? :D 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

There's at least one thing I felt I need to ask about: I keep seeing this and it's making me think even conventional AA must be broken sometimes. In any case it's clearly not doing its job right at the moment.

iris(2023-09-1903-44-37)(4277.73111.07-305.75).thumb.jpg.03895825e3f89668a1f1335e1dd4f647.jpg

I enabled 4x MSAA just to alternate. As can be seen on most objects, it usually works as you'd expect. But then why do I get such sharp edges only on the newspaper? It's not an alpha texture, the model is fully opaque and this is its geometry edge... it should this be subject to AA as anything else, yet it doesn't seem to be affected and still looks jagged.

I see this effect on bright lamps sometimes. I didn't report it as I presumed it's a high-res alpha channel which I know current AA can't address. But this clearly isn't the case so now I'm curious what's happening?

Edit: The forum insists on scaling the image to a lower resolution so here is the full res.

Edited by MirceaKitsune
Link to comment
Share on other sites

22 minutes ago, AluminumHaste said:

Turn off bloom?

Is bloom causing it? Didn't think to try that: Just started the FM so next time I pass by the area I'll try that as well. Also the sharpness filter even if it's at a low setting, I'll feel silly if that was literally undoing the effects of AA :D

I was thinking the newspaper being so bright compared to the background might have something to do with it. Though IIRC AntiAliasing scans geometry edges only and shouldn't care about brightness per say.

Link to comment
Share on other sites

Could be the sharpness shader. Try turning it off or lowering the value. It uses contrast to detect edges so that bright paper vs dark background may be throwing it off a little.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I turned off both bloom and sharpness filter, yet AA continues to generate fully sharp edges around that newspaper. Now it's really peculiar... wonder if anyone else can reproduce this? FM Iris, getviewpos:

4251.78 123.7 -271.75   9.2 -30.5 0.0

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      @joebarnin
      Jeff, I sent you PM a few weeks back but you did not respond. Maybe your inbox is full?
      · 5 replies
    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
×
×
  • Create New...