Anti-Aliasing: Get rid of those jaggies!

Posted: January 21, 2012 in INFR 2350
Tags: , , ,
Be sure to right click and open image in new tab/window to look at images in full size on the screenshot comparisons. The thumbnails don’t show all that jaggy goodness.

I’ve been noticing a while while playing Gran Turismo 5 (GT5) there would often be “jaggies” (rough lines) in the shadows of vehicles or in the lines of the car in certain light. I thought to myself what’s going on? A quick search and I quickly found out it was the anti-aliasing that couldn’t keep up in the game on the PS3.

I would like to write a whole blog post on everything there is to know about anti-aliasing, the limitations on current generation consoles, and all sorts of goodies; but let’s be serious, I’m not expert on this stuff. So I’ll write what I know and what I have experienced. Nothing more, nothing less. I can’t pretend to know everything and ramble on about anti-aliasing when I have no idea what I’m talking about. But on with the post.

What is anti-aliasing?

It is a technique for removing/minimizing/smoothing edges that contain artifacts that create a “jagged” look. These jagged edges are often called “jaggies”

When there becomes an abundance of jagged edges on the objects in a game within a scene, it can become quite overwhelming and look… well, bad.

Here is an example of a jaggy showing up in GT5 in one of the car’s shadows:

Where is it used?

For this blog post I will be concentrating on anti-aliasing on the PS3. Though it is still used on the Xbox 360 as well as computer based games. It’s pretty much used anywhere you need to smooth an edge, not gaming exclusive.

Okay… so the PS3 can make things look all smooth and awesome?

No. Not always. Let’s start with the PS3’s hardware. It uses a cell processor as its CPU that is a PowerPC-base core with several SPEs (Synergistic Processing Elements). The graphics is done through the PS3’s GPU, called the RSX based off of Nvidia’s G70 architecture.  The system has 256MB of RAM and the GPU has a total of 256MB as well, combining to a total of only 512MB of RAM in the whole machine. In today’s standards, that’s not a lot of RAM. This causes developers to develop techniques around these hardware limitations to squeeze the most graphics performance out of the machine. So after giving you an idea that the PS3’s hardware isn’t the most hardcore hardware for gaming, let’s get onto how it does the anti-aliasing.

The conventional way/old school way of doing anti aliasing is doing all the processes through the GPU. Nowadays new techniques are being developed for anti aliasing processing.

What kind of techniques are used for anti-aliasing? 

PS3 supports a variety of AA (anti-aliasing) techniques. There is the the technique that the Xbox 360 uses which is MSAA (Multi-sample Anti-Aliasing), QCAA (Quincunx Anti-Aliasing), and the more recent MLAA (Morphological Anti-Aliasing).

The PS3’s quincunx AA is sad to have superior anti aliasing over Xbox 360’s MSAA without affecting performance/using more resources. QCAA likes to blur details more, thus blurs the jaggies together making things look smoother. A comparison of MSAA with an Xbox 360 and QCAA with a PS3:

Although the Xbox shows a bit more detail texture wise, it does contain a lot more jagged edges versus the PS3’s smoother anti aliased scene.

Well about those other techniques you said developers are using?

An interesting custom anti aliasing technique used in a game was actually done in The Saboteur by Pandemic. Some people say they simply found edges and blurred them, it’s actually not the case. They developed an algorithm that took advantage of the PS3’s cell processor and ran the algorithm through its SPUs, finding edges using luminance and applying multiple passes of blending over the edges to make it look good.

Well how did they go and do t hat?

The Saboteur took advantage of the PS3’s Cell CPU (this anti aliasing cannot be found on the Xbox 360 version of The Saboteur). They offloaded tasks usually only processed by the GPU onto the SPUs of the PS3. This allowed it to do all the processes sooner, allowing the game to pass the scene several times through a “filter” of blurring the edges in the game. Though because this technique puts the whole screen through the filters before outputting them onto the screen, even the HUD is affected by the AA technique, blurring the HUD. Here is a comparison of the PS3 and Xbox versions. Sadly I cannot embed the video. But I here are pictures as well:

PS3

Xbox 360

I enjoy how one of the bushes in the well’s shadow is completed unaffected and remains green on the Xbox screenshot. Shadows on dynamic objects… hmm, maybe the next post? 

http://www.eurogamer.net/videos/the-saboteur-xbox-360-versus-ps3-face-off

Summary

Overall, anti aliasing techniques are evolving, though in the current generation platforms/consoles, it is very limited on what we do due to the limited resources in the hardware. Through this, developers are innovating with new ideas, creating new anti-aliasing techniques. It may work for them, but in the end it has to work well for your game. Every technique has a tradeoff, performance and graphic-wise. Though AA is a great example of seeing how developers are pushing limited technology to their limits and developing techniques into further advancement.

Advertisements
Comments
  1. Quincunx anti-aliasing makes me a sad panda 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s