FXAA/SSAA instead of AA?

Discussion in 'Planetary Annihilation General Discussion' started by RaTcHeT302, August 20, 2012.

  1. RaTcHeT302

    RaTcHeT302 Guest

    Another question if hopefully the game get's founded I think that there should be more focus on implementing FXAA and SSAA into the game seeing as they are much less heavier and better looking than now dated AA.

    http://steamcommunity.com/sharedfiles/f ... d=90544054

    Also will there be more emphasis on DX10/11 and would it be possible to choose the render distance of when models lose their details and such?
  2. coldboot

    coldboot Active Member

    Messages:
    447
    Likes Received:
    112
    They're not using DirectX because the game will be multi-platform, including all of Windows, Linux and MacOS.
    brianpurkiss likes this.
  3. RaTcHeT302

    RaTcHeT302 Guest

    Oh right, OpenGL.
  4. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Alright, "quick" anti-alias overview.

    SSAA (super-sampled anti-aliasing) is the original anti-aliasing technique. In the average use case it can be best described as rendering the scene at a higher resolution and down sampling to the screen resolution, so at 2x SSAA a 800x600 game is rendered at 1600x1200 and shrunk to 800x600. This means for every displayed game pixel four points were rendered and combined.

    MSAA (multi-sample anti-aliasing) is essentially the same idea as SSAA, render multiple sample points and combine for each pixel. However 2x MSAA only renders two points per pixel instead of four points like SSAA, and only the opaque objects. Transparent objects are rendered separately and added afterwards. 4x and above render that number of points at randomized or offset positions with in each displayed pixel to try to reduce aliasing over what the classic SSAA is generally capable of. This means 4x MSAA is generally superior to 2x SSAA in reducing jagged edges on opaque object edges at a slightly reduced quality of transparencies.

    CSAA (coverage sample anit-aliasing) or similar methods take the same samples as MSAA would, but does additional work to determine how much of that sample should contribute to the final pixel.

    There are also AA methods for transparency that can be run in addition to MSAA or CSAA so that non opaque edges are filtered as well.

    There are also various adaptive anti-aliasing methods that try to find geometry edges and only enable or increase the number of samples of the anti-aliasing method along those edges.

    FXAA (fast approximate anti-aliasing), MLAA (morphological anti-aliasing), and similar anti-aliasing methods are completely different beasts. These are post process effects that take the final rendered image and apply the equivalent to a very clever Photoshop filter that slightly blurs high contrast parts of the image. MLAA was originally only available on the Sony PS3, but is now also on AMD video cards on the PC. FXAA is available on all NVidia video cards, but they've also released the code for it optimized for all consoles and even mobile devices and can be directly implemented in to any game that runs D3D or OpenGL.


    So, here's the kicker. FXAA looks great in screenshots or if nothing is moving on screen. In motion it does very little to reduce perceived aliasing. It also has a tendency to cause problems with UI elements and text when forced on via drivers. The other more traditional AA methods are not obsolete, they handle the movement of edges across the screen far better than the post process type anti-aliasing. MSAA and FXAA Used together they can create visual superior anti-aliasing with less of a performance hit than SSAA alone.

    I've seen some articles gush over Crysis's implementation of SSAA as being superior to MSAA techniques... but they're not doing anything particularly special with their SSAA, it's just their games have a lot of transparent objects and sharp edges created by shaders rather than geometry. In these cases SSAA will always win over current MSAA techniques visually. Since MSAA and even adaptive techniques are all based on geometry edges, as more games use complex shaders and transparency to create detail these techniques become less effective.


    So, if you've made it through that wall of text, I do plan on getting FXAA in to the game on all platforms that are capable of it along with MSAA or CSAA or whatever the default AA methods the platform supports.
    Gorbles and brianpurkiss like this.
  5. RaTcHeT302

    RaTcHeT302 Guest

    WOHOO! Anyway I mixed MSAA with SSAA, thanks for clearing it up.
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Which means you asked for MSAA and FXAA, which are both basically just half baked solutions?
    Anyway I dont think AA is really important, they should focus on other things.
  7. RaTcHeT302

    RaTcHeT302 Guest

    I know but it's still a PC game, they'll probably have a scheme on how to do things and this was probably planned already.
  8. roadkillgrill

    roadkillgrill Active Member

    Messages:
    230
    Likes Received:
    14
    They are not half baked solutions, they are solutions that can approximate the effect at a significantly reduced cost. There are tons of examples of approximations being used over true solutions in games.
  9. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    just because everybody uses FXAA for their screenshots and to make ads, does not mean it is a useful feature for the actual player.
    AA is supposed to make the Game good, like real good, if you have to power. And PA wont have that complex graphics, so SSAA might work fine with faster computer.
    But whatever, I dont really care about it anyway^^
  10. thygrrr

    thygrrr Member

    Messages:
    252
    Likes Received:
    1
    I wonder what all of this has to do with OpenGL vs DirectX, but seriously, any moderately recent API version (DX 10+, OpenGL 4.0+) will totally suffice.
  11. RaTcHeT302

    RaTcHeT302 Guest

    It's just a lot less intesive than other AA types, that's all. :lol:
    Last edited by a moderator: August 21, 2012
  12. yinwaru

    yinwaru New Member

    Messages:
    188
    Likes Received:
    0
    As long as I'm able to force SGSSAA via the nVidia control panel and actually have it work, I'll be happy.
  13. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    For this game, MSAA / CSAA will generally be superior than SSAA performance wise and there's unlikely to be a significant difference visually. If you really want it I can't guarantee SGSSAA will work at this time, but there's no reason it shouldn't that I'm aware of.
  14. yinwaru

    yinwaru New Member

    Messages:
    188
    Likes Received:
    0
    I'm mainly interested in SGSSAA for screenshots - it looks awesome when supported and I think that PA will have lots of screenshot-worthy moments.

    It's not really a huge deal or anything if it ends up not working with the game, it's just a nice thing to have.
  15. Ortikon

    Ortikon Active Member

    Messages:
    414
    Likes Received:
    183
    Awesome read,
    I reposted that "wall of text" onto the rendering forum at work. I have been having trouble getting people to use more "double res" as we call it, instead of using the anti-aliasing sample settings that are provided in mental ray.
    Lately people leave resolutions at the base 950x534 and pump up the sampling to 2min 3 max from a preferable 0min 3max on sets and 0min 2max on FX (which get blurred and processed later on so are generally low render settings)
    This has really helped me let them understand that when they say "ya but in games I use 8x aliasing, why cant I do 3x" they are confusing these settings around.
    In production, we use an array of parameters to solve aliasing on every shot individually.
    Some shots will get away with double res on the diffuse passes and then standard everything else.
    While others have slow push cameras that make the whole shot boil with crawling. Depending on what kind of "crawling" we get, we will use combinations of increasing res alongside a gauss filter. Bumping aliasing min max samples, and adjusting the sampling contrast. The compositing software is where the frames get resized back to standard resolution alongside a filter built into the resize function (we use EWA filter).

    Working in this environment has really ruined my ability to stomach small amounts of aliasing in some games, I have a pretty decent rig just for that. On our quality checks for TV shows, any form of flicker down to a single flashing pixel WILL be sent back to be solved. I have manually painted out flickering on individual pixels to save time re-rendering the shot where it was appropriate. At least with PA, its an RTS and I dont really notice it as much. Watching live sports makes me jealous, they get away with so much, but what else can be done anyways?

    The fact that you guys get this stuff running real time is amazing to me still. Average shot has about 20 individual passes (layers) of images. Each frame is about 6-12 minutes for the diffuse, lighting about 4 minutes or less with the system I have implemented, and the smaller mattes and FX are about 7-45 seconds per frame, and these layer sets are on a per character/per set/ per prop basis that are rendered individually. It would take about a three months for an individual computer to render a single episode.
  16. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    fixed.

Share This Page