Multi-Sampling Anti-Aliasing Explained
Alan writes: "FiringSquad.com just posted a new article explaining how next-generation multi-sampling anti-aliasing works. They claim that it will bring us one step closer to anti-aliasing without a performance hit, and that the technology is going to be implemented in one of the new chips coming out? (NV20 anyone?). It's pretty technical, so only hard-core techies need apply. The link is over here."
There is an easy way to measure the resolution of your eyesight. Stare at the moon and try to remember the details you can see. Go home, find a hi-res picture of the moon on the net, and shrink it until you get pretty much the same amount of detail.
The moon looks to me like a 30x30 pixel jpeg. The moon diameter is about 0.5 degree, so I can see 60 pixels/degree (which is about the textbook value). My digital camera can see 23 pixels/degree.
A group of graphics researchers in Vancouver, Canada have posted a comprehensive analysis of various antialiasing techniques both in hardware and software, including regular supersampling, stochastic supersampling, and filtering. They give a lot of theoretical justification from a signal processing perspective of all of them.
--
* CmdrTaco is an idiot.
"Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
When I first got Unreal 1, I had a crappy Rage Pro video card that could barely run the game at all (on a Mac too). Like most games, I had to crank the resolution all the way down to play it at all
The minimum resolution available was 640x480 Pixel-Doubled, which by itself is not exactly an innovation. But they were running it through the 3D card for the pixel-doubling step, so it was effectively blurring the image with bilinear interpolation as it scaled. It didn't look nearly as bad as it sounds, and it ran quite well.
Is it feasible to do something like this to accelerate a high-resolution display? The individual pixels would be much less noticable, and that 75% saved fillrate could be put towards something other than basic rasterization.
Aw, crap.
Does this mean that you are questioning authority???
By questioning him, are you acknowledging his authority?
-I just work here... how am I supposed to know?
I like the fact that hardware is catching up to some of the rendering algorithms and ideas that are used in software rendering.
;)
The better the hardware can simulate what a rendered image will look like, untill it is good enough to produce fullmotion 3D video on the fly, the less test renders will be needed. That makes my life sooo much easier. It almost bugs me how much of my cpu time is used for throw away images...
if only you could sell frames on ebay...
-I just work here... how am I supposed to know?
Think early Playstation 1 games vs. Nintendo 64. N64 uses much more antialiasing, resulting in a smoother (blurred?) look.
AFAIK that's not antialiasing: that's merely blurring -- properly antialiased images do not appear blurred (just look at fonts on Windows and Mac).
--
Let's look at this, shall we?
8-bit color translates into a maximum of 256 possible colors at any one time. That will give you a playable game, but it's not going to look very photorealistic. Doing twisted things to exceed that on a display will make the hardware or software doing that convoluted and will negate any possible advantages to working with one byte pixels.
Furthermore, 8-bit color doesn't mix like 32-bit color. You have to go through the motions of doing a color mix on each of the RGBA values on the palette entries and then re-map the resultant color to a (hopefully) matching color in the palette. It's actually SLOWER to do it that way. The only reason why we did 8-bit color in the first place was that it was cheaper back then to do it that way- not because it was superior in any way to anything else.
I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
I can not make myself an authority, I can be one only in other people's perceptions. For better or worse, there are some people who consider me one. I sometimes find this perception of authority to be in excess of the reality, and thus put that disclaimer in my .sig a while back. But then, someone (was it you?) found fault in my previous .sig, too.
It would be silly for me to claim to be free of ego or self-promotion. I've tried to be an agent for constructive change, and being publicly known has been one of the tools I use. I'm sorry that offends you, but I like myself the way I am.
Thanks
Bruce
Bruce Perens.
Let's place that dividing line where it belongs. Before and after Katz.
I see even classic Slashdot is now pretty much unusable on dial up anymore.
Only if it makes it invisible.
I see even classic Slashdot is now pretty much unusable on dial up anymore.
Lets see, this feature making it into the NV20 is highly unlikely. NVidia probably has had the overall chip design set in stone for at least the last 6 months. Maybe the NV30 or so...
The article talks about a radicially different approach to FSAA. It would be like saying the NV20 will support the Vodooo 5's method of FSAA. At the hardware level, there are dramatic changes needed to implement this new FSAA method. Something that won't happen for a long while, just like the integration of any 3dfx Rampage tech into the NVidia product line.
The article says that there's no rendering bottleneck, but there is still a bandwidth hit proportional to the amount of super-sampling you're doing. That's correct, however it says that the cost of that bandwidth hit will be offset by advances in bandwidth-conservation or enhances (new memory, Z-compression etc).
Is this really the case? If graphics and PC architecture have shown us anything it's that memory bandwidth is the thing that's slowing us down the most, and that problem is only getting worse. Graphics chipsets are already using what seems to be fairly extreme memory technology. Current nVidia chipsets are running on 128-bit-wide 230MHz DDR SDRAM (almost 460MHz effective), and they're already memory-bandwidth-limited without adding a 4x memory bandwidth increase. Memory technology is getting better, but not at anywhere near the speed that graphics technology is improving.
The article does mention some techniques for offsetting the huge gap we've currently got between CPU and memory capabilities, some of which are being used on ATI's Radeon, but are these techniques effective enough to offset a 4x memory bandwidth penalty? Any ideas?
Why hasn't anyone else picked up on this? The thumbnail versions of the diagrams explaining anti-aliasing were created using subsampling, and as a result look absolutely horrible. This is really bad design under any circumstances, and absolutely inexcusable in this context!
In case you missed it, the bad-looking thumbnail images are here and here.
I have put properly anti-aliased versions of the same images here and here. (Isn't that much, much better?) These were created with 'pnmscale', a free (speech, beer, and everything else) tool that has been around for a decade now.
Cool. I had wondered what created that effect. I've noticed that quite a few materials have that "static" look to them when you light them with the laser. I think the best are cheap plastic toy balls. The ones two are three inches in diameter made out of translucent plastic work really well.
his id is roughly yours/100, so who are you to speak for anyone?
hehe, that's a great idea. We should impose a caste system based on user id. People over 50000 can slave in the mud pits making bricks as people under 20000 mercilessly whip them.
And if you're good, you can be one of the guys who feed wine and grapes to those under 1000 and keep the fan moving.
Vidi, Vici, Veni
Somebody moderate the parent down. Its one of those lamer IE haxor tricks.
(wasting my automatic 2)
Is it just me or has the quality of lamers gone down.
http://isaac.exploratorium.edu/~pauld/summeer_i
It is quite an interesting effect but has nothing to do with you'r eyes' resolution.
--Ben
Pixar has a patent on the stochastic dither multi-sample antialias. They've enforced it before.
Uh-oh. POV-Ray uses it. Shh, don't tell Pixar. Wait, you used to work for Pixar... But, that was a zillion years ago. How long 'till the patent expires?
Become a FSF associate member before the low #s are used
Bruce, you used to work for Pixar, and you know more about software patents, so you'd probably know more about this than us.
I've read the text of the patent and can't work out exactly what they claim. It reads like they claim any application of Monte Carlo integration to image generation. Also, how come they've been able to file what looks like the same patent three times?
I have the impression that Pixar are actually better than most about their patents, and I believe they've never tried to enforce their claimed API copyright. (Just as well for them. API copyrights are untested, and I don't think they want to be the first to test them. But then, it might just be because nobody tried to stand up to them.) Who did they enforce it against, and do you know what the circumstances were?
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
This new form of sampling shows that hardware manufacturers have finally woken up to the fact that, to use Renderman terminology, the shading rate (the sampling rate at which textures, lighting etc are determined) and the pixel sampling rate should be decoupled. This simple anti-aliasing technique samples uses a pixel sampling rate at 4x the shading rate, using ordered sampling. Eventually we will see graphics cards where these two figures can be tuned separately, but it won't be for a while.
BTW, "anti-aliasing" is a bit of a misnumer. Ordered sampling does not remove aliasing. Neither does stochastic sampling. Ordered sampling merely moves the filtering problem up a few octaves. Stochastic sampling hides the aliasing behind noise, because our eyes find that less objectionable. The only way you can truly remove aliasing is analytically. Don't expect that in your graphics hardware for a long time. :-)
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
There are two ways the home user can emulate this exciting technology today! that's right, in your very own home, right now! These methods are quick, easy and proven!
a.) use a tub of vaseline smeared over the screen.
b.) use a bottle of vodka.
I am not drunk.
Glen Murphy
In the world of Digital Signal Processing, aliasing is the result of periodic sampling introducing artifacts into the signal. For instance, a 1001 hz tone sampled 1000 times a second will sound like a 1 hz tone.
In video, this comes out as edges (which are local areas of high frequency) coming out funny or jaggedy. Close together diagonal lines will cause Moire patterns. et cetera.
Antialiasing is any attempt to eliminate these artifacts. At really low resolutions, antialiased stuff will look blurry, while non-antialiased stuff will look blocky. Typically, the eye will be a lot more forgiving to a little blurriness than it will to the regular patterns of moire patterns and stair step edges.
Hope that helps
-me
Trees can't go dancing
So do them a big favor
Pretend dancing stinks!
From what I understand, reading the ATI Radeon spec several months ago, there is an issue with at least setting the Z-values to zero at the beginning of each frame. Though I don't know that compression affects this or related stages, there are still flushes that need to occur. And without specialized memory with block operations (SGRAM?) it takes time.
-Michael
-Michael
It's a perfectly anti-aliased blank screen though, isn't it? and with no performance hit! :)
/Fross
True, textured 3d polygons are already antialiased by definition (you take a texture, resample and stretch it to fit on the polygon depending on what angle you're viewing it at, voila). The one part that isn't is the edge of these textures. Hence why when you're playing halflife or whatever and everything is rendered nice and softly, if you look up at the edge of a building against the sky, it's horrible and jagged.
FSAA, the way i understand it, softens these edges before sending the image along. It doesn't affect the actual contents of polygons, just their edges.
Fross
Additionally the Voodoo 5 has had full FSAA since its launch. So I think they've been working on it for a while, and it's likely the NV20 will have it - it's probably just been one of the less touted figures so far.
Fross
..those "screens" you'd clip over the front of your CRT to reduce glare (and radiation, as was touted back in the 80s. But then again monitors back then could be pretty damn dangerous) - they made everything soft and fuzzy. blurry, to be honest. If anything they caused more eye strain as you tried to make out what anything was behind it :> like having a permanently really filthy screen.
Fross
Amazing. Back in '92 I went over to Silicon Graphics for three days to port a simulator we were writing for Unisys to the MIPS chip. At the time SGI had one of the first Reality Engine machines in the demo room, and the engineers took us over to look at it and drool at the mouth over the incredible beauty of the real-time 3d displays it could produce.
Back then, no matter how cheap PC's eventually became, I couldn't imagine that kind of liquid photo-realistic 3d ever being affordable.
I'm quite happy to be proven wrong, and be one step closer to photorealistic 3d.
LibBT: BitTorrent for C - small - fast - clean (Now Versio
It's not as simple as blurring. Anti-Aliasing adds information (or rather it enhances it). Blurring removes it.
Think of what happens when you photocopy a photograph (in an old machine). You get black and white splotches. Anti-Aliasing is like a greyscale copier - It occurs at the same time the image is being sampled. Blurring occurs after the image is sampled and doesn't improve anything. If you took off your eye glasses to look at the photocopy of a photograph you just made, it won't look like greyscale.
Yah, right, no performance hit. I've heard that one before. Nice try guys.
FORGET THE ANTI ALIASING in games, okay?
Give me a deep story line with complex NPC interaction and conversations, and I won't care if the graphics are blocky, 320x200, and super aliased.
Ultima, Star Control II, System Shock 1/2, and Deus Ex rock the universe.
Why is everyone so obsessed with the latest game graphics, when the story lines suck eggs (or don't even exist)?
========================
63,000 bugs in the code, 63,000 bugs,
ya get 1 whacked with a service pack,
--- Grow a pair, liberals... stop letting the Republicans bully you!
The reason no-one has done this in cheap realtime PC hardware before is simply that it takes a @£$%ing lot of flops to do.
A pizza of radius z and thickness a has a volume of pi z z a
They've also shown their willingness to license the patent (MentalRay has a license, I believe). I thought the patent was on jittered supersampling. I didn't know it had anything to do with the dithering pattern, and the article doesn't mention anything about jittering the samples. In any case, the distributed ray tracing paper appeared in the '84 SIGGRAPH conference proceedings. The patent should be about to die if it hasn't already.
When you're dealing with a scanline renderer, you want a regular grid of pixels, because the algorithms take advantage of a simple data structure (e.g., a Z buffer). Trying to do it adaptively in this case would complicate the algorithm and probably slow you down quite a bit more than you'd gain by having fewer Z values.
I will make a few points after reading alot of comments here.
1. Brute Force is almost never the only way to go.
2. Selective antialiasing is a technique that had been used in 3D packages for ages. I am thinking about Lightave specifically but they all have them. The whole point is that rendering at a higher resolution and scaling the image down does not give you better antialiasing than a selective antialiasing technique that consumes the same resources. I can atest to this, I have tried it. It is kind of temporary solution as I see it, until anti-aliasing techniques are implemented in hardware.
This Wiki Feeds You TV and Anime - vidwiki.org
How can you say it's not worth the performance hit?
It agree that I can live without AA when I'm playing a game at 1280x1024 at 30 FPS. One frame doesn't stay still long enough for me to notice.
But it makes a huge difference when trying to read normal text at a small font size! Totally worth the speed difference there, which is negligible, for much prettier and more readable fonts.
You're so right, brute force is the way to go, but there's dumb brute force and smart brute force ...
Hmm I see your point.. I looked it up and FSAA is probably the better method here. Still, as a "cheap" software replacement multi-sampling might proove usefull for modified versions with larger sample grids or things like that. As I mentioned before for simple surfaces you can e.g. work with gradient (1/z) encoded spans to search for the edges, to eliminate the 'brute' from brute force here.. just thinking aloud here now though..
With great power comes great electricity bills.
You need to consider every pixel, because every pixel can be valid for an anti-aliassing operation. FSAA is a trick to increase overall picture quality. Applying the method to only parts would lead to ugly artifacts.. You
The anti-aliasing method discussed here detects edges in the model, not so much in the textures, so it presumes allready filtered or mipmapped textures. In that regard you could say that edges don't need to be detected for polygonal models that have smooth surfaces. But don't froget that any transformation can deform objects into hard-edged models which then again do need every pixel on the surface traced for possible hard edges.
So instead of having to worry about the nature of the surfaces ( which could no doubt be determined by examining normals and smoothing groups), 3D cards generally resort to brute-force algorithms in the image synthesis stages of the pipeline. It could actually be easy to generate gradients, but that only works economically for flat surfaces, and only for multi-sampling, not for any other type of sampling method.
With great power comes great electricity bills.
The one part that isn't is the edge of these textures.
I believe you are incorrect. Textures get antialiased, true. This has been going on since the days of Voodoo1. The edges you see are not the edges of textures, rather, the edges of a model (polygons) in relationship to the rest of the scene. Hence the term "Full Scene Anti-Aliasing". Even a shaded mesh rotating on screen would result in "jaggies". At that point it has nothing to do with the textures.
There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
With the older cards I've purchased, a distant ship appears to be a bright clump of disfigured pixels. Without the multisampling, the colors/shades chosen are either extremes from the edges of the model, or last-come-last-served colors. Multisampling gives a much better representation of that "region of space." By balancing samples from the model against the portion of samples that hit dead space, the pixels more accurately represent the core model fading at the edges.
Just as a point of interest, and education:
There is an easy way that you can observe the finest possible detail that your eyes can resolve. This is merely for demonstration and educational purposes, and does not have other immediate applications. This small experiment will merely allow you to observe the individual "pixels", you could say, of your own eyes.
Get a hold of a simple penlight laser pointer, and point it away from you at something that will make a nicesplash of light, such as a bit of matte white plastic, a dirty glass, etc.
While holding the point of laser light perfectly still (if possible), also hold your head still. You might want to have your pointer resting on something, as well as your head. (Safety first kids! Don't look directly at the laser)
Observe the pattern of light/dark Pixelation. Note that the pattern does not twinkle and does not shift so long as you hold your head still, and you hold the light still.
Barely move you head slightly and slowly, and notice that pattern of Light/Dark moves slowly and consistantly with your head movement. The relationship of the light/spots does not shift at random, but shifts consistantly with your head motion, while you keep everything else still.
The Light/Dark spots are essentially you seeing the individual Pixels (cones and rods, actually) of your your own eyes.
"It is a greater offense to steal men's labor, than their clothes"
When we push the boundaries of what is computationally possible, there are two forces that act on the innovation. The first is optimization; the original technique is re-analyzed, to either make the computation more efficient (software optimization), or to make the compuation faster (hardware optimization). The second is consumer demand: if the feature makes things look cooler and/or more realistic, the technique becomes popular, and becomes one of the standard tools.
Are we at the final stage in graphics technology? I think not. Remember Doom 2? There were very cool scenes, where you were looking at 50+ enemies, some just 4 pixels, and they were ALL shooting at you. In Quake, a level might have 13 enemies total. We could use Doom's level of enemy depth, but with 3D models and multi-level worlds.
We still haven't mastered some environmental effects, such as heat distortion. A burning barrel should have an effect on the scene behind it, as well as realistic fog effects. A strightforward implementation may also help better model bullet paths, so that you really can't snipe from 5 miles away.
Of course, all these are just visual tricks, that need to be put in service of a good plot. It seems a shame that just as technolgy gets to the point that Looking Glass Studios can have graphics comparable to the plot, they get pushed out of business. When you can really model a whole world, Richard Gariott decides to industry can't support his business plans. When you can make a real-time version as beautiful as the original Myst, Cyan does it, instead of making a new product.
The tricks and effects are too tempting right now, so that we simply make things beautiful without making them intellegent. This will change, and the masters will use every tool at their disposal.
It's to take those ugly jagged edges off your fonts and stuff. It takes edges that jump from black to white (or any one color to another) and makes a gradients, to fool the eye into thinking there are many more pixels there than actually are. looking from far away it apears to be a very smooth curve, but as you know pixels are in a square grid, and don't really make nice circles. it's all about looks. not really worth a performance hit.
Think early Playstation 1 games vs. Nintendo 64. N64 uses much more antialiasing, resulting in a smoother (blurred?) look.
Dear google, please explain antialiasaing...
Thank you !
Cui peccare licet peccat minus. -- Ovid, Amores.
Maybe its a limitation of the extremely pipelined graphics architecture prevalent today, but why not use some kind of thresholding algorithm to determine when a pixel needs to be antialiased?
i.e. for each scan line, check the (color or z)value of the current pixel, and only perform the antialiasing step if the difference between them exceeds some value.
As i understand it, FSAA actually antialiases every single pixel.. Surely this is incredibly inefficient, since antialiasing the already bilinearly-interpolated texture of the interior of a polygon is somewhat pointless.
If this approach is unwieldy, i'd be interested to know why.
I gots ta ding a ding dang my dang a long ling long
...just "forget" to clean your glasses for a couple of days. You wont believe what it does to those jagged lines.
This paid my last vacation, it mi
LSI is currently being used all over the place in Non-destructive testing. The movement of these speckles is very sensitive to the movement of the surface. For example, one can cover an inflated airplane tire with laser light and take an image. Next, add an additional 1-5 PSI to the tire and cover it with laser light and reimage it. Now when you subtract the two images, you will get nice 'moirre'-like fringes. Any small gashes or imperfections will be surrounded by many fringes and will be easy to see.
I can recommend an excellent and very readable book on the subject: Gary Cloud's 'Optical Methods of Engineering Analysis'. His text covers Birefringent materials and laser speckle interferometry in graet detail. It also covers many other areas such as Holagrams and I forgot what else.
Keeping
Consider several areas: Games, CG effects for movies/video, impact on system cost.
In games: At some point, focus on technology detracts from the actual game. If it is assumed that the total cost (that amount that will be spent on development) is fixed, then money spent supporting this type of technology will not be spent on more levels, maps, characters, artwork, etc. The key remains suspension of disbelief.
Movies/video: This is interesting, because newer graphics hardware allows PC rendering to look much closer to dedicated CG effects systems. Yet there is a performance gap. Will we be able to make movies on our PCs? Yes. Does anyone care about the difference in rendering quality? Probably not, unless you're trying to get a studio to release your movie.
System Cost: The GeForce II MX that I put into the last system that I built cost about 60% of the price of the EGA card that I bought in 1988 (maybe 1987). Looks great; less filling (time).
Short answer: not much difference. We've definitely reached the point of dimishing returns in application of graphics technology.
Floating face-down in a river of regret...and thoughts of you...
Bruce
Bruce Perens.
Before you try to educate someone else, start with yourself! The light/dark pattern thats seen with the experiment you describe is nothing more than an interference pattern created when the monochromatic and coherent light reflects off the surface of the object you're looking at and strikes your retina.
For a more complete description, take a look at:
http://www.repairfaq.org/sam/laserioi.htm#ioiscs0
Now, as far as eye resolution goes:
"For an eye with 20/20 vision, the angular resolution is 1 arcminute (1/60th of a degree)"
With this information, we can make a good guess at what a monitors resolution "ought" to be.
Take the sine of 1/60º and multiply this by the aproximate distance from the monitor.
At 3 feet, you get about 0.0105 inches. So you need about 100 pixels per inch. Thats 10,000 per square inch.
A 17" monitor is about 13"x10", so a resolution of 1300x1000 should do the trick at 3 feet.
Also, notice the qualifications I made
A 17" monitor...
This shows that the statement: "The human eye can see aliasing artifacts at resolution up to and even beyond 4000x4000, so obviously 1600x1200 is not sufficient.
is meaningless without knowing the viewing distance.
But even knowing the viewing distance still gets us no where. Notice the ought above in quotes. No matter what the resolution of the monitor, there exists textures that will cause aliasing unless other steps are taken. Outline of a proof:
1) Cast one ray from the virtual eye (POV) through each pixel of the screen onto a surface parallel to the screen, but some distance away in the virtual world.
2) Where the cast rays meet the surface, find the texture element of the surface at this intersection and color it white.
3) Color the rest of the texture elements black.
It should be obvious that the surface viewed at this distance with this texture and without anti-aliasing will appear totally white. It should also be obvious that for any resolution we can create a texture that will cause this effect.