Idea for an additional Anti-Aliasing method: Downsampling

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Freezy

FNG / Fresh Meat
Aug 6, 2010
273
37
0
Update:

I'm posting comparison pics from the RO2 editor from the second page of this thread here so they don't get lost and people just skipping through see them:

The downsampling is done with the "tiledshot" console command and then scaling with a picture editor. Please open them fullscreen to truly see the difference. Look at the tree in the back on the right and the power lines running to the church, a lot of detail gets added when you are downsampling from a higher resolution.
As an added benefit the image gets a lot calmer in motion, no more shimmering and crawling edges, see the two youtube videos (again, select good quality and fullscreen):

1920x1200, no AA:
http://i.imgur.com/GN7J6.jpg

1920x1200, MLAA Ultra:
http://i.imgur.com/UFpb7.jpg

1920x1200, downsampled from 3840x2400:
http://i.imgur.com/93b8b.jpg


Videos:



Check out this video of to see what SSAA can do in regard to flickering opposed to MSAA, let alone FX- or MLAA which are worse than MSAA by a magnitude.

Please use HD and fullscreen, look at the roof on the top left and the runway in the middle.

www.youtube.com/watch?v=gn8EPiiPpMQ



Here's a comparison between MLAA and SSAA in Dishonored, skip to 6m45s for a side by side comparison. Check the stairs and the gate in the background. Again, HD + fullscreen, you don't play your games in a tiny window and with 640*480, do you ;)?

www.youtube.com/watch?v=mOhXGgVQFo8&t=6m45s



Original text:
Hey everybody, as most of you know the deferred DX9 renderer of RO2 doesn't play nice with traditional Anti-Aliasing and only has shader-based post-process Anti-Aliasing implemented which doesn't reach the results true AA would.

Let me introduce you to an Anti-Aliasing method that will work with nearly every game, no matter the engine or API used:
Downsampling


Downsampling means rendering the game at n-times the resolution of your monitor and then scale it down to your native screen-resolution, giving a very smooth image.
Example: With a screen-resolution of 1920*1200 and a downsamplingfactor of 4, the game would be rendered at 3840*2400. Your performance in theory would scale linearly to 1/4 of the performance without Downsampling.

Example pictures made by myself with Crysis (view in full resolution):

1920*1200, no Downsampling/Anti-Aliasing:
http://i.imgur.com/Gz2rs.jpg

2880*1800@1920*1200 (2.25 times native resolution):
http://i.imgur.com/tmrM2.jpg

3840*2400@1920*1200 (4 times native resolution):
http://i.imgur.com/G1sd4.jpg

Look at the palm leaves or at the vine to the left to see what difference it makes. Note that even the renderinfo overlay gets smoothed (as well as the HUD, if I hadn't disabled it for the screenshots)

As you can see the performance hit is heavy, but not completely linear on my system. If it was linear, 2.25 DS should give 20.98 fps, 4 DS should give 11,8 fps. Look at my sig for my system specs (nowhere near high-end)(edit: I upgraded my system since I made this post, these screens were made with a HD5770).


DirectX 10 and above have this implemented natively, so if you have a DX10/10.1/11 game that lets you alter your screen-resolution through .inis you can try this for yourself and see how awesomely smooth it looks in motion.
Guide for Crysis:
Spoiler!




Implementation in RO2 could work like this (besides the coding, theory explained above):
Put a line in the ROEngine.ini like "DownsamplingFactor=X" and multiply the horizontal and vertical axis of the resolution you selected in the graphics menu by this factor for testing at first and maybe make it an option in the graphics menu later (with a warning about the perf-hit) when it was tested enough.


Thanks for reading.
 
Last edited:

Lone Rebel

FNG / Fresh Meat
Jan 29, 2012
307
37
0
Italy
Uhm... ehumhhrrrmmm.... WHAT? :confused: :D

Seriously, can you translate it in more simple terms?

For those that doesn't crunch these things every morning having breakfast (not me, of course :D )

What would be the difference and why the current antialias is bad?

Btw, didn't stared at them for long, but those 3 screenshots looks just the same to me...
 

Freezy

FNG / Fresh Meat
Aug 6, 2010
273
37
0
Uhm, okay sorry if my post is too technical.^^

Try to look for edges with high contrast in the pictures like the vine at the left side of the picture or the rock against the sky in the middle of the picture to see the difference. view them in full resolution. the difference lies in the amount of jaggies (or steps) visible in the picture.

In simple terms, the current methods (FXAA, MLAA) just blur the screen a little to achieve a smoothing of the picture (like a slightly out of focus camera). I didn't say they are bad, the outcome they provide is quite okay in relation to the performance they need, but some people (like myself) just don't like the blurring they introduce. Also, I don't want them to be removed, I just wanted to point you guys to an alternative.

Downsampling creates the picture at a higher resolution and sizes it down to your monitors resolution (like in paint "change resolution"), thereby carving out more details and making them visible.

Here's a .gif to illustrate what Anti-Aliasing does:
http://www.tweakguides.com/images/Antialiasing.gif[url]http://www.tweakguides.com/images/Antialiasing.gif[/URL]

Look at the antennas on the rooftops.

However, the method used in this .gif is not possible in RO2 without visual glitches because of the engine used, so I wanted to show a method that works with RO2 and really gets more detail in the picture and not just blurs it.
 

HellsJanitor

FNG / Fresh Meat
Jan 5, 2012
403
107
0
I usually turn Anti aliasing off completely or only leave it at 2 samples. The problem with it is that it generally is inefficient. On my machine running crysis with a geforce GTX 470 with windows xp and dx10 on ultra + 4 samples AA usually gets me 27-31 FPS average. Arguably it's because I'm using older software with newer coding, but 2 samples of AA or simply none at all takes me to +65 FPS. I really don't find the smoother edges and increased pixelation to be a real burden since the trade off is a smoother game especially online.

What I find rather confusing is your explanation that downsampling is simply a compressed higher resolution image. Wouldn't the results be similar/the same as an adjusted high-resolution image without downsampling? I'd love to hear me about this.
 

Lone Rebel

FNG / Fresh Meat
Jan 29, 2012
307
37
0
Italy
Ok, i got it.

You'd go for taking out the (heavy) blur effect from the game (which i don't really like, unless for suppress or some special weather effect, thinkin of fog, or heavy rain in daylight...

The thing i don't understand, is how a bigger native image scaled down to my game res is gonna look better and be lighter at the same time :confused:
Or it won't be lighter at all? :confused::confused::confused:
 

fredkruge

FNG / Fresh Meat
May 19, 2009
274
47
0
Canada
I understand the idea but I believe that it makes the image quality a bit more grainy, which for some people is not desireable.
The big issue for this is the performance hit that it will cause :/
 
  • Like
Reactions: Xendance

Freezy

FNG / Fresh Meat
Aug 6, 2010
273
37
0
It will drop performance lower than FXAA, but create a better image.

About the higher resolution image downscaled/adjusted high-resolution image thing:

That's just how Anti-Aliasing works. MSAA will only render the geometry at a higher resolution and scale it down, MSAA + Transparency-AA will render the geometry and textures with transparency ( a chain-link fence for example) at higher res and scale it down, SSAA will render the whole image at a higher res and scale it down.

Those traditional methods however will create visual artifacts in RO2, see this post from Ramm-Jaeger for explanation:
http://forums.tripwireinteractive.com/showpost.php?p=880473&postcount=63[url]http://forums.tripwireinteractive.com/showpost.php?p=880473&postcount=63[/URL]

Downsampling technically is Super-Sampling Anti-Alasing with an ordered grid, but works a little different behind the curtains, therefore not creating these artifacts.

Forcing SSAA trough the driver showed the same artifacts as MSAA does last time I checked, but I will test it again when I get home later today.
 

Freezy

FNG / Fresh Meat
Aug 6, 2010
273
37
0
So, I did a quick test,

1920*1200 4x SSAA forced with the Catalyst Control Center:
http://i.imgur.com/KjY3w.jpghttp://i.imgur.com/KjY3w.jpg

Notice the bright outline on the characters arm, that shouldn't be there.

edit:
PS: Fredkruge, please note I wasn't the one disliking your post. I know Downsampling can have a heavy hit on performance depending on the amount selected, it clearly is a higher end feature, but with the new AMD cards out in the wild and the new NVidia generation expected to be introduced in the next few months this will become less and less of a problem.
I played RO1 at least 4 years and changed my graphicscard a few times in that timespan, so see it as an investment in the future.
 
Last edited:

Golf33

FNG / Fresh Meat
Nov 29, 2005
922
170
0
Does forcing traditional multisampling AA in the graphics card still break the game menus?
 

Freezy

FNG / Fresh Meat
Aug 6, 2010
273
37
0
I don't know if it still breaks the menus, but it still (and will forever) cause the artifacts I showed in the screenshot in post #9.
 

Golf33

FNG / Fresh Meat
Nov 29, 2005
922
170
0
That artifact doesn't bother me, in fact I get it using the in-game FXAA anyway (though not quite as much). When I force MSAA using nVidia Inspector, several of the in-game menus go blank - which does bother me.

Pity, because (in my opinion, and on my system) forced MSAA looks better than the in-game FXAA and performs better as well.
 

Raneman

FNG / Fresh Meat
Jan 12, 2011
642
788
0
You can do this yourself.

I run RO2 in 3200x1800 on a 1600x900 monitor.
 

Freezy

FNG / Fresh Meat
Aug 6, 2010
273
37
0
would you explain me how?
setting
Code:
[SystemSettings]
ResX=3840
ResY=2400
in ROEngine.ini makes the game crash once and revert it to 1920x1200 for me.
 

WingmanSR

FNG / Fresh Meat
Sep 6, 2011
65
35
0
Connecticut, USA
would you explain me how?
setting
Code:
[SystemSettings]
ResX=3840
ResY=2400
in ROEngine.ini makes the game crash once and revert it to 1920x1200 for me.

The higher your resolution, the more GPU RAM is being used. Most likely, the amount of graphics RAM you need to run at that res exceeds the amount you have on your GPU. Have you tried 1.5x downsampling?(2880x1800)

Edit: You may have to create a custom resolution within the graphics drivers and then select that from the video settings menu. I run RO2 at 2560x1440 downsampled to 1920x1080, however, I added 2560x1440 as a custom resolution in the nVidia control panel. I don't know how to do that with the AMD CCC though.
 
Last edited:

Freezy

FNG / Fresh Meat
Aug 6, 2010
273
37
0
Running low on VRAM most times doesn't cause a crash, only swapping to the much slower system RAM, causing horrible stutter.

Forcing Downsampling on an AMD videocard with the CCC is currently not possible because you can't set a custom resolution easily afaik.
That's why I ask for a native implementation, so everybody can use it more easily.
 

Amuro Ray

FNG / Fresh Meat
Sep 3, 2011
23
6
0
I personally don't think that the image downsampling provides compared to the drain it creates is worth it.
 

SoFGR1

Member
May 16, 2012
80
2
8
any info for 120hz monitors ? i use a samsung 2233rz, 1680*1050 - 120hz refresh rate, what values should i use ? i'm a bit confused :confused: