Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 12-Mar-2011, 23:25   #1
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default GPAA demo (Geometric Post-processing Anti-Aliasing)

I just uploaded a demo of GPAA, a post-processing antialiasing technique that is using the actual geometric information to blend pixels with neighbors along geometric edges. The best case is actually near horizontal or near vertical edges, with the worst case being diagonal lines, although those are handled pretty well too.

Comparison with and without GPAA:


Downloadable from my website.
Toggle GPAA with F5.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 12-Mar-2011, 23:33   #2
Davros
Darlek ******
 
Join Date: Jun 2004
Posts: 9,501
Default

do near horizontal or near vertical edges need aa ?
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™
Davros is offline   Reply With Quote
Old 13-Mar-2011, 00:01   #3
EduardoS
Member
 
Join Date: Nov 2008
Posts: 131
Default

Very nice, how much performance cost?
EduardoS is offline   Reply With Quote
Old 13-Mar-2011, 01:29   #4
Xenus
Senior Member
 
Join Date: Nov 2004
Location: Ohio
Posts: 1,209
Default

Interesting Humus how much more costly would be a 10 bit implementation? Obviously using 7 bits for the coverage is a bit overkill but I was thinking 3 bits for the neighbor and at least 6 bits for coverage while not expecting something along the lines of a 9 bit implementation.
Xenus is online now   Reply With Quote
Old 13-Mar-2011, 03:04   #5
CNCAddict
Member
 
Join Date: Aug 2005
Posts: 278
Default

Looks great. Seems to have the worst edge quality (still very good) at somewhere areound 10-20deg angle. Looks perfectly smooth once you get very far away from there!!! So I expect this will be in the next Just Cause ?

Last edited by CNCAddict; 13-Mar-2011 at 16:56.
CNCAddict is offline   Reply With Quote
Old 13-Mar-2011, 12:11   #6
Graham
Hello :-)
 
Join Date: Sep 2005
Location: Cambridge, UK
Posts: 1,307
Default

Very nice. I suspect the buffer copy isn't going to be an issue for the vast majority of games.

Naturally I'd wonder how fast it is with a more complex scene. GPUs typically aren't too hot at drawing lines.

You should also look into applying this technique to shadow post processing. This was similar to an experiment I'd done a long time ago - however I didn't preprocess the model the way you are (cpu silhouette detection instead), and I found I was limited by DX9's capabilities.

My concern is it'll start to fall over once you get very small triangles. Certainly subpixel triangles would be an interesting case
Graham is offline   Reply With Quote
Old 13-Mar-2011, 12:18   #7
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

Quote:
Originally Posted by EduardoS View Post
Very nice, how much performance cost?
What I measured on my HD 5870 was 0.08ms for copying the backbuffer and 0.01ms for the edge smoothing at 1280x720, so it's indeed very cheap. But it is also dependent on the scene geometry complexity, so more advanced scenes would be more costly.

Quote:
Originally Posted by Xenus View Post
Interesting Humus how much more costly would be a 10 bit implementation?
Well, it would be 2bits more costly. To be honest, I don't even know how well suited this technique would be for a hardware implementation, although I find the idea attractive. I'm sure there are corner cases I haven't thought about (thin triangles, corner pixels etc).
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 13-Mar-2011, 21:25   #8
no-X
Senior Member
 
Join Date: May 2005
Posts: 2,038
Default

Quote:
Originally Posted by Davros View Post
do near horizontal or near vertical edges need aa ?
I hope this isn't ironically meant rhetorical question... In the case it is, ignore my reply Yes, near vertical/horizontal edges need AA mostly:



Current rotated-grid / sparse sampling methods, which reach maximum anti-aliasing potential on near vertical/horizontal angles, are so popular because of that.
__________________
Sorry for my English. But I hope it's better than your Czech
no-X is offline   Reply With Quote
Old 13-Mar-2011, 21:50   #9
trinibwoy
Meh
 
Join Date: Mar 2004
Location: New York
Posts: 9,809
Default

GTX 580, 1920x1200. GPAA On/Off: 513/552 fps.

Interesting approach but like Humus said, competitors like SRAA and MLAA are much less sensitive to scene complexity.
__________________
What the deuce!?
trinibwoy is offline   Reply With Quote
Old 14-Mar-2011, 06:46   #10
I.S.T.
Senior Member
 
Join Date: Feb 2004
Posts: 2,448
Default

I tried this demo a few times, and I cannot spot the differences with GPAA on or off. MSAA is not being forced on by my video card, and it's not enabled in the options.
I.S.T. is offline   Reply With Quote
Old 14-Mar-2011, 16:34   #11
pcchen
Moderator
 
Join Date: Feb 2002
Location: Taiwan
Posts: 2,348
Default

I was thinking, is it possible to detect which pixels are on the edge without the second line pass?
One idea I can think of is to put the positions of the vertices available to the pixel shader, then compare the pixels' positions against the edges. If it's within a certain margin (such as, maybe less than one pixel or something), consider it's to be an "edge pixel." I am not sure about the cost of this (compared to a second edge pass) though. But at least there would be no need to send the geometry twice.
pcchen is offline   Reply With Quote
Old 14-Mar-2011, 18:43   #12
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

Quote:
Originally Posted by I.S.T. View Post
I tried this demo a few times, and I cannot spot the differences with GPAA on or off. MSAA is not being forced on by my video card, and it's not enabled in the options.
Does edges look smooth or jagged?

Quote:
Originally Posted by pcchen View Post
I was thinking, is it possible to detect which pixels are on the edge without the second line pass?
One idea I can think of is to put the positions of the vertices available to the pixel shader, then compare the pixels' positions against the edges. If it's within a certain margin (such as, maybe less than one pixel or something), consider it's to be an "edge pixel." I am not sure about the cost of this (compared to a second edge pass) though. But at least there would be no need to send the geometry twice.
Absolutely, that's next on my list of things to try. If the final geometry pass can be eliminated then that's certainly a good thing.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 14-Mar-2011, 19:30   #13
homerdog
hardly a Senior Member
 
Join Date: Jul 2008
Location: still camping with a mauler
Posts: 3,637
Default

Everything looked really smooth and ran fast on my friend's laptop which has some pathetic nvidia dx10 chip.

The scene was extremely simple; how would this technique fare in something like Crysis or JC2? Often it seems those games that need AA the most are those that least benefit from post-process AA, or MSAA for that matter.
__________________
Quote:
Originally Posted by Humus View Post
Releasing a game in 2010 without AA is a completely foreign concept to me. If the technique you're using makes it impossible to use AA then you're using the wrong techniques. As simple as that. Releasing a PC game without AA options is OK only if that means you can only have it enabled[...]
homerdog is offline   Reply With Quote
Old 15-Mar-2011, 19:01   #14
Graham
Hello :-)
 
Join Date: Sep 2005
Location: Cambridge, UK
Posts: 1,307
Default

Quote:
Originally Posted by pcchen View Post
I was thinking, is it possible to detect which pixels are on the edge without the second line pass?
One idea I can think of is to put the positions of the vertices available to the pixel shader, then compare the pixels' positions against the edges. If it's within a certain margin (such as, maybe less than one pixel or something), consider it's to be an "edge pixel." I am not sure about the cost of this (compared to a second edge pass) though. But at least there would be no need to send the geometry twice.
I've tried this in the past in DX9... It didn't work because the interpolators always give you the value at the centre of the pixel unless you are drawing lines - hence it works so easily here. I suspect DX10/11 could manage it though

[edit] Actually I think you mean something else... never mind
Graham is offline   Reply With Quote
Old 15-Mar-2011, 20:56   #15
I.S.T.
Senior Member
 
Join Date: Feb 2004
Posts: 2,448
Default

Quote:
Originally Posted by Humus View Post
Does edges look smooth or jagged?



Absolutely, that's next on my list of things to try. If the final geometry pass can be eliminated then that's certainly a good thing.
Edges look smooth no matter the setting. I've checked and double checked my control panel settings. Running a Geforce GTS 250 with driver 266.35. Vista x64(Though, I doubt that matters...).
I.S.T. is offline   Reply With Quote
Old 17-Mar-2011, 23:15   #16
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

It turns out there is a patent on pretty much exactly this idea from 1996, which the author of it pointed out to me in the comments on my website:

http://www.freepatentsonline.com/6005580.pdf

Does anyone know what I should make out of this? How would this affect my demo? Would anyone using this technique need to obtain a license or something?

I have other ideas based on similar principles which I'd like to explore, how different would a technique have to be to not clash with any patent? I notice for instance that there's another patent which approaches the problem in a similar fashion, but just does things a little bit different (shade both sides instead of filtering):

http://www.freepatentsonline.com/7286138.html

And what about this:
http://www.faqs.org/patents/app/20080252659
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 18-Mar-2011, 01:45   #17
homerdog
hardly a Senior Member
 
Join Date: Jul 2008
Location: still camping with a mauler
Posts: 3,637
Default

1996? Is that still valid?

The guy doesn't sound hostile in his comment.
__________________
Quote:
Originally Posted by Humus View Post
Releasing a game in 2010 without AA is a completely foreign concept to me. If the technique you're using makes it impossible to use AA then you're using the wrong techniques. As simple as that. Releasing a PC game without AA options is OK only if that means you can only have it enabled[...]
homerdog is offline   Reply With Quote
Old 18-Mar-2011, 02:54   #18
3dcgi
Senior Member
 
Join Date: Feb 2002
Posts: 2,020
Default

I think patents are valid for 20 years and it doesn't matter if the inventor doesn't sound hostile since he doesn't own the patent. It's assigned to Micron. I don't know why they were interested in AA back then. Did they ever make graphics chips?
3dcgi is online now   Reply With Quote
Old 18-Mar-2011, 09:10   #19
AlexV
Heteroscedasticitate
 
Join Date: Mar 2005
Posts: 2,354
Default

Quote:
Originally Posted by 3dcgi View Post
I think patents are valid for 20 years and it doesn't matter if the inventor doesn't sound hostile since he doesn't own the patent. It's assigned to Micron. I don't know why they were interested in AA back then. Did they ever make graphics chips?
Rendition perhaps? They were acquired by Micron IIRC, and were a bunch of clever chappies.
__________________
Donald Knuth: Science is what we understand well enough to explain to a computer. Art is everything else we do.
AlexV is offline   Reply With Quote
Old 18-Mar-2011, 10:23   #20
jlippo
Member
 
Join Date: Oct 2004
Posts: 705
Default

Quote:
Originally Posted by AlexV View Post
Rendition perhaps? They were acquired by Micron IIRC, and were a bunch of clever chappies.
Their AA was quite nice when it worked. (like in Grand Prix Legends)
If memory serves me correctly they basically rendered wu-line on polygon edges, thus got very fast and good looking AA.
jlippo is offline   Reply With Quote
Old 19-Mar-2011, 19:25   #21
Iron Tiger
Member
 
Join Date: Dec 2004
Location: SoCal
Posts: 845
Send a message via ICQ to Iron Tiger Send a message via AIM to Iron Tiger Send a message via MSN to Iron Tiger
Default

Any guess why GPAA doesn't work with NV 3D Vision?
__________________
Submit to Donimation, Global Donimation.
Iron Tiger is offline   Reply With Quote
Old 01-Jul-2012, 16:01   #22
I.S.T.
Senior Member
 
Join Date: Feb 2004
Posts: 2,448
Default

So, I was playing Lego Batman 2(Excellent game, BTW), and decided to check out the config file for it. I found the following:

Quote:
FileVersion 5
ScreenWidth 1600
ScreenHeight 900
WindowWidth 1280
WindowHeight 720
WindowLeft -1
WindowTop -1
ScreenRefreshRate 60
VerticalSync 1
AspectRatio 1
FSAA 0
ShaderQuality 2
ShadowQuality 3
TextureQuality 1
SoftParticles 1
Brightness 10.000000
SFXVolume 7
MusicVolume 7
MasterVolume 10
MusicEnabled 1
SubtitlesEnabled 1
MouseSensitivity 10
InvertY 0
Vibration 0
BloomEnabled 1
ExposureControlEnabled 1
DoFEnabled 1
SoftShadowsEnabled 0
SpeedBlurEnabled 1
MotionBlurEnabled 1
ProcessColourEnabled 1
WaterDistortionEnabled 1
EdgeAAEnabled 0
GPAAEnabled 1
SSAOEnabled 0
RingEffectEnabled 1
LensFilterEnabled 1
ScreenSpaceReflectionsEnabled 1
UseHires 1
UseHiresPending 1
ForceMultithreadedD3D 0
IgnoreVendorPresets 0
DisableShaderCaching 0
DisableMultithreadedShaders 0
AllowVendorExtensions 1
The most relevant portion is bolded.
I.S.T. is offline   Reply With Quote
Old 04-Jul-2012, 01:41   #23
Humus
Crazy coder
 
Join Date: Feb 2002
Location: Stockholm, Sweden
Posts: 3,216
Send a message via ICQ to Humus Send a message via MSN to Humus
Default

I had to download the demo and see if it was indeed using GPAA. I took a PIX capture of it, and unfortunately I see no evidence of GPAA being applied. Without FSAA enabled in the menu everything looks jagged. With it enabled there's some sort of crude "Edge AA" effect applied, but this is done through a fullscreen pass. In the frames I captured the game never drew a single line primitive. If the game is indeed using it, and that option is not just a remnant from some prototyping, then I suppose it's only used for some specific geometry somewhere.
__________________
[ Visit my site ]
I speak for myself and only myself.
Humus is offline   Reply With Quote
Old 05-Jul-2012, 19:19   #24
Davros
Darlek ******
 
Join Date: Jun 2004
Posts: 9,501
Default

Humey have you seen this ?

http://www.crcnetbase.com/doi/abs/10.1201/b11642-6
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™
Davros is offline   Reply With Quote
Old 05-Jul-2012, 20:53   #25
homerdog
hardly a Senior Member
 
Join Date: Jul 2008
Location: still camping with a mauler
Posts: 3,637
Default

Seems he wrote it.
__________________
Quote:
Originally Posted by Humus View Post
Releasing a game in 2010 without AA is a completely foreign concept to me. If the technique you're using makes it impossible to use AA then you're using the wrong techniques. As simple as that. Releasing a PC game without AA options is OK only if that means you can only have it enabled[...]
homerdog is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:59.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.