Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nemesis6 on February 12, 2010, 12:09:15 pm

Title: Anti-aliasing introducing artifacts
Post by: Nemesis6 on February 12, 2010, 12:09:15 pm
I'm talking about the driver-forced kind. It seems to introduce artifacts on effects like thrusters/afterburners. In practice it translates to four small artifacts around crafts' engines, following them around. Sometimes it's not really visible, at most times, it's pretty visible, though. I know I'm entering into a touchy subject, I mean the way the game's renderer works and all, but I thought I'd see if I couldn't stur up the nest as far as this apparent non-issue goes.
Title: Re: Anti-aliasing introducing artifacts
Post by: Herra Tohtori on February 12, 2010, 12:14:11 pm
It is a known issue on NVidia cards at least. Enabling anti-aliasing seems to be the deciding factor with those flickering dots after thrusters, but there are conflicting reports with different graphics cards (mine is a GF8800GT and the issue definitely depends on anti-aliasing with this one). I do not know if it occurs on Radeons too.

Since it seems to be basically a hardware/driver issue, there is a limited amount of things that can be done about it. Turning anti-aliasing off is an option but suckens the general graphics in my opinion at least.
Title: Re: Anti-aliasing introducing artifacts
Post by: chief1983 on February 12, 2010, 05:33:23 pm
I've got a G92 card and haven't seen any issues with 2x or 4x AA and 2x AF forced in the control panel.  Just my report.
Title: Re: Anti-aliasing introducing artifacts
Post by: Zacam on February 12, 2010, 06:33:48 pm
Chief: but is yours forced to over-ride the application or enhance the application?

I get defects on my 7600 GT, 8800 GTS 640, 8800GT 512 and my 9800 GT's if I override the application settings under any AA values, but if I set it to enhance, no artifacts.
Title: Re: Anti-aliasing introducing artifacts
Post by: chief1983 on February 12, 2010, 06:44:57 pm
Override.
Title: Re: Anti-aliasing introducing artifacts
Post by: Nemesis6 on February 13, 2010, 10:00:21 am
I tested this with a Radeon 4870, and it appeared on that card, too. I think I'll test the "enhance" feature, but isn't that contingent on the game already having anti-aliasing? I'm using a 260GTX, and I'll have a stab at it right now.

Edit: As I expected, "enhance" does nothing. Override works, but with very visible artifacts.
Title: Re: Anti-aliasing introducing artifacts
Post by: ChronoReverse on February 13, 2010, 04:31:18 pm
It appears on my GTX260 as well.  With the combined supersampling and multisampling modes, the effect is smaller but still there =(
Title: Re: Anti-aliasing introducing artifacts
Post by: CP5670 on February 13, 2010, 06:31:59 pm
I get this effect too, but I have seen it for so long now that I'm used to it. You can see it on not only thrusters, but text and interface graphics too. It has something to do with how the game handles pixel coordinates on textures. It may be possible to avoid it with a pure SSAA mode like 4x4, but those modes are performance hogs for the IQ you get.

A lot of games were affected by this issue in the late 90s, and many games had command line switches to fix the problem depending on the video card. Descent 3 had something like that for example.
Title: Re: Anti-aliasing introducing artifacts
Post by: Venox on March 12, 2010, 02:14:53 pm
My apologies for bumping this thread, but I felt this response didn't warrant a completely new thread, plus it may solve the problem brought up. I had also had this problem with the artifacts behind thruster trails.

I use a nVidia GTX290, and use the nHancer (http://www.nhancer.com/) utility.
 
However I was messing around with nHancer settings, and I appear to have found a configuration that seems to almost completely eliminate the artifact. Almost, because if you boot up the F3 tech lab, go to a rather large ship such as the Colossus, or as I tested, the SJ Dante and Vishnan Preserver from the BP: AoA Director's Cut, and you turn on thrusters and zoom as far out as you can, I was still able to see some artifacting, but certainly not as much as before. I couldn't exactly figure out how to take screenshots to demonstrate my comparison from the F3 tech lab. >_>

I am not sure if it will help anyone, as my configuration could completely have other factors that may have helped, but I played through the vanilla FS2 campaign with mediavps, The Procyon Insurgency, and BP: AoA Director's Cut with this new FreeSpace 2 nHancer profile and definitely did not notice any of the old thruster visual issues.

The profile is set to a Combined, 2x2 Supersampling / 8x Multisampling, with Anisotropic Filtering set to 16x, Vertical Sync is on, OpenGL Triple Buffer Forced, High Quality Texture Filtering.

(Btw, it appears I cannot directly attach an nHancer (.nhprofile) file, so I have packaged it within a .7z, which is allowed.)

I'm not entirely sure if this will work for everyone, or...anyone. As previously noted, the problem is one that can probably never truly be solved, and I'm one of those players who cannot stand playing any version of FreeSpace 2 without anti-aliasing. But at least if this helps some people, I'm glad. I can't think of any other possible details I can give, but if anyone gives the profile a whirl and sees a difference (or subsequently, no difference), I'll try and see what else may have worked.

Again, if I wasn't supposed to bump, my apologies, not very much of a poster you see. (I lurk a lot though.) =)

[attachment deleted by admin]
Title: Re: Anti-aliasing introducing artifacts
Post by: chief1983 on March 12, 2010, 02:57:17 pm
Try FRAPS or even just the PrintScreen key to take screenshots in the lab.
Title: Re: Anti-aliasing introducing artifacts
Post by: Dragon on March 12, 2010, 03:05:04 pm
Is the engine overhaul project going to deal with this issue?
Title: Re: Anti-aliasing introducing artifacts
Post by: chief1983 on March 12, 2010, 03:10:31 pm
Not any time soon at least.
Title: Re: Anti-aliasing introducing artifacts
Post by: Venox on March 12, 2010, 03:57:38 pm
Try FRAPS or even just the PrintScreen key to take screenshots in the lab.

Okay, so Print Screen WAS taking screenshots, I just couldn't locate them. :p

Anyhow. They were in .tga format and I didn't have a reliable way to convert them to .png so I apologize if image quality seems poor.

I didn't take too many, each ship seems to vary in how effective the change seemed. Mostly it seems affected by distance, as even with these new settings, zooming as far as out possible still shows slight (but a lot less noticeable) artifacting.

If you click on the thumbnails and then again on the next page, looking at the pictures full, you can best see the artifacts. Didn't think I was allowed to post full screen images here so thumbnails, ahoy!

(http://img13.imageshack.us/img13/5142/screen0006h.th.png) (http://img13.imageshack.us/i/screen0006h.png/)
Combined, 2x2 Supersampling / 8x Multisampling

(http://img715.imageshack.us/img715/1333/screen0012.th.png) (http://img715.imageshack.us/i/screen0012.png/)
16x Multisampling/Coverage Sampling (seemed equivalent to just using the nVidia Control Panel to override with 16xQ, what I've been playing with for the last two years)

(http://img695.imageshack.us/img695/8683/screen0011.th.png) (http://img695.imageshack.us/i/screen0011.png/)
Combined, 2x2 Supersampling / 8x Multisampling

(http://img718.imageshack.us/img718/424/screen0013.th.png) (http://img718.imageshack.us/i/screen0013.png/)
16x Multisampling/Coverage Sampling

Granted those pictures weren't exactly same distance, same angle, so I tried a more equal comparison with the Vishnan Preserver (it seemed to demonstrate the difference best IMO).

(http://img291.imageshack.us/img291/8001/screen0027z.th.png) (http://img291.imageshack.us/i/screen0027z.png/)
Combined, 2x2 Supersampling / 8x Multisampling - half zoom

(http://img13.imageshack.us/img13/7994/screen0028.th.png) (http://img13.imageshack.us/i/screen0028.png/)
Combined, 2x2 Supersampling / 8x Multisampling - max zoom

Note that there was still artifacting in the above two pictures, though not as much as these two below.

(http://img251.imageshack.us/img251/8969/screen0029.th.png) (http://img251.imageshack.us/i/screen0029.png/)
16x Multisampling/Coverage Sampling - half zoom

(http://img684.imageshack.us/img684/8994/screen0030.th.png) (http://img684.imageshack.us/i/screen0030.png/)
16x Multisampling/Coverage Sampling - max zoom

Ninja Edit!: Forgot to add, by all means, my eyes could totally fail and these pictures are still horribly bad. XD But at least to me, It visually feels better in game!
Title: Re: Anti-aliasing introducing artifacts
Post by: The E on March 12, 2010, 04:00:59 pm
These pictures ARE bad. They are taken from a distance that is far too great to make out details.
Title: Re: Anti-aliasing introducing artifacts
Post by: Venox on March 12, 2010, 04:02:55 pm
These pictures ARE bad. They are taken from a distance that is far too great to make out details.

Sorry, but I thought that was the point. The artifacting won't be seen on the thruster tails at any closer of a distance, which I had presumed was the problem outlined in this thread. If I had completely misjudged the problem at hand though, I am sorry for trying to help.

At the very least, it seemed to work for me. I don't know how else to describe what I can see changed. I'll see what else I can do. *shrugs*

Thanks for your time. =)
Title: Re: Anti-aliasing introducing artifacts
Post by: Herra Tohtori on March 12, 2010, 04:03:21 pm
These pictures ARE bad. They are taken from a distance that is far too great to make out details.

The flickering artefacts tend to appear at long distance and disappear as you go closer to the thruster in question.
Title: Re: Anti-aliasing introducing artifacts
Post by: The E on March 12, 2010, 04:05:57 pm
Sorry, my bad. didn't read the thread properly.

Anyway, shouldn't that same effect be more visible on fighters, at shorter ranges?
Title: Re: Anti-aliasing introducing artifacts
Post by: chief1983 on March 12, 2010, 04:08:21 pm
So he's right.  Anyway, try converting with IrFanView or Paint.NET, both can handle the TGA format.
Title: Re: Anti-aliasing introducing artifacts
Post by: taylor on March 12, 2010, 05:01:05 pm
Has anyone ever tried simply setting the texture wrap mode to clamp-at-edge instead of wrap when rendering the thrusters?  If it's a border addressing issue then that should fix it, and take all of 4 lines of code to do.