Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Antialiasing in Unity 5

Discussion in 'General Graphics' started by Stormbreaker, Jul 11, 2014.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    What about that temporal anti-aliasing that NVIDIA have been touting with it's reduced performance impact?

    Or could you even add a minimal amount of motion blur to get a similar result?
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's probably better to have non-post built in AA because MSAA in deferred is a tricky beast and some of the work is done for us, so having it at a slightly lower level might help.
     
    GoGoGadget and shkar-noori like this.
  3. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151
    Is there any chance whatsoever we will see a MSAA implementation in deferred? Even World of Warcraft did a DX11 version of theirs because post-processing anti-aliasing is terrible.
     
    shkar-noori likes this.
  4. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    The problem with that particular example is that DX11 is only 1 of Unity's build targets, Windows Standalone. I'd rather have no solution at all than have even more fragmented features added to the engine.

    I think Unity are much less likely to implement single platform features than something that works on everything, too.
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I actually think Unity's priority should be the platforms that make the most of technology, as mobile will catch up way quickly. So instead of crying for mobile feature X, it's already built into Unity by that point due to embracing it earlier.

    So DX11 + console support is a must for us.

    Rambling aside, lets see what Unity comes up with after 5. I think things are kind of locked until release at this point.
     
    hopeful, jcarpay and shkar-noori like this.
  6. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    I read this thread with great interest, together with the informative Toms hardware post. It sounds like a lot of anti-aliasing works only on certain graphics cards. If I'm looking to publish via webGL for many potential users, all with varied graphics cards and hardware, is there a safest option that I can go for of the Unity post-processing effects?
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    There are no "certain graphics card" requirements for any of the post-processing effects (aside from meeting the minimum specs for running Unity stuff at all, of course).

    --Eric
     
    arumiat likes this.
  8. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    I don't know how they pulled The Blacksmith demo [FXAA?], but it was beautiful.
     
  9. braaad

    braaad

    Joined:
    Oct 4, 2012
    Posts:
    102
    If it was me doing a video like that I would just super sample the whole thing (would be very low fps especially if doing something like 16x), then speed it back up for the video.
     
  10. gtpdzbiz

    gtpdzbiz

    Joined:
    Mar 21, 2011
    Posts:
    53
    Video wise super sampling works best, beats any AA solution out there. One thing you could do is by modifying the projection matrix a little bit so it has a bit of sub pixel jitter on each frame, then accumulate several images together to get a very clean result, and you don't need to deal with oversized rendering target.
     
  11. tynew

    tynew

    Joined:
    Sep 25, 2013
    Posts:
    122
    I might like to point out that since PBR requires HDR/tonemapping to get the math correct, this means most games should be in deferred rendering. We really do need temporal AA in Unity5.
     
    shkar-noori likes this.
  12. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You mean linear, not deferred.
     
    Deleted User likes this.
  13. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Appearantly there is a 5.1 beta already, so... when will this be?

    If there are people working on it they can most likely estimate whether it'll take a week, a month, three months, ..., right? :D
     
    shkar-noori likes this.
  14. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    source?
     
  15. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Topic in announcement board, and a 5.1 pro beta subforum appeared. Though there are no posts in it.
     
    shkar-noori likes this.
  16. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    Technically 7.4 is also post-5.0.
     
    shkar-noori likes this.
  17. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    That's why I'm asking for an estimate how long it will take.
     
    shkar-noori likes this.
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Unity doesn't operate like this. Unity's unwilling to commit to time frames as more pressing tasks can occur, or mistakes can happen and people can flat out change their minds. The best thing to assume is that it is not coming.

    For instance right this moment, Aras is working on something *much better than an antialiasing shader you can make or buy* by optimising the engine core - something nobody here can make or buy, and this is a brilliant use of his mind (although no doubt he will have something to say):

    http://aras-p.info/blog/
     
    Stormbreaker and shkar-noori like this.
  19. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    After reading this entire thread, and understanding all of 5% of what I read... from a total newb point of view, is this what I can expect from Unity 5 free version for now, or am I just seeing something weird:

    1. Create a new 3D project

    2. Add a sphere (I've tried the Unity sphere and also low and high poly ones I've done in blender)

    3. Set everything to fantastic/highest quality settings, including x8 AA

    4. Build and run Windows Store version (confirm it has fantastic as default quality) on desktop PC (not phone or tablet)

    ...nasty jagged edges all around the sphere, looking like some homemade junk engine and not AAA at all.

    I figured since Unity is somewhat a high-level engine (tons of stuff can be done without any code at all), the default settings would at least produce a decent looking simple scene with just a sphere in it. Wrong?

    I tried changing the rendering path from deferred to forward. No difference. I tried installing the AA image effect (standard asset) and dropping that script on my camera.. it did make the game preview in the editor look different (blurred, not really good, but at least different), but seems to have no effect at all when I actually build + run the game. I tried all the different modes for the AA image effect script, they all look different in the editor Game tab, but not when I build and run.

    Doing all of my testing with "Windows Store Build" so far... is it just the lame duck, or from what I'm reading in this thread does AA just take a lot of extra work (or something I just missed) in Unity 5? I wish I had a screenshot I could post, it's truly embarrassing how bad this sphere looks... it's almost Minecraft (but in a bad way) like.
     
  20. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    Hardware AA doesn't work with deferred rendering. Forward rendering in Unity 5 with 8X hardware AA:

    Screen Shot 2015-04-13 at 2.35.20 PM.png

    No issues. If you use deferred rendering, you need to use an image effect (which is less than ideal, but that's the state of things right now).

    --Eric
     
  21. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    Thanks. I guess I'll try getting creative, since I'm planning a fixed camera angle anyway, so technically 2D/sprites could work. I think I'm not seeing that quality likely because:

    1. Image effects require shader 3 -- I think my video card, while pretty awesome (most AAA games look great, even recent ones), is only shader 2.

    2. Hardware AA probably also isn't working.. this one might just be a setting or something, or maybe related to Windows Store builds being different rendering (i.e.-FRAPS can't capture them)... and my vid card is pre-Win8, so maybe device driver issues/etc.
     
  22. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    Edit: Sorry to have hijacked this thread. I thought it was going to be more on-topic, but as it isn't looking that way, I created my own thread over here and will post to it instead.

    Actually my video card supports shader model 5.0... so now I'll have to do more testing and try to figure out why my results look worse than the image above, and adding AA image effects made no difference.

    My graphics card:
    http://www.newegg.com/Product/Product.aspx?Item=N82E16814161396

    According to this is shader 5.0:
    http://www.hwcompare.com/11771/radeon-hd-6870-vs-radeon-hd-7750/

    This said Radeon 9500 had 2.0:
    http://docs.unity3d.com/Manual/GraphicsEmulation.html

    I guess I assumed that was newer, since higher number.
     
    Last edited: Apr 13, 2015
  23. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    Radeon 9500 is old. Note that the docs use year, not model number ("AMD cards since 2005" for SM3); the model number is just an example of one particular card that fits the description. I know first-hand that image effects work fine with a Radeon 5870 and a Radeon R9 280x, so I'd assume that they work with a 6870 since that's somewhere in the middle of those two. Deferred rendering with AA image effect using default settings:

    Screen Shot 2015-04-13 at 5.20.13 PM.png

    It's pretty meh compared to real AA, but better than nothing, mostly.

    --Eric
     
  24. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    I guess this is on-topic for this thread again, so here is where I'm at now...

    Untitled.png

    The top half is what I get when I build + run for Windows Store. The bottom is what I get when I build stand-alone Windows EXE. Any ideas why I'm seeing the difference, when both are running on the same PC, just a different way of building?

    I only have 1 camera in the scene, and I've set it to Rendering Path = Forward. That is all that is needed to change the rendering path, correct? When I build a Windows Standalone I notice there is a player setting for rendering path, but for Windows Store there is no setting like that.

    Quality settings are the same for both builds, the default "Fantastic" except I've changed AA to x8.
     
  25. DennG

    DennG

    Joined:
    Dec 5, 2013
    Posts:
    158
    arumiat likes this.
  26. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
  27. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    Thanks, and watched. For now I've given up on my pool game :( It's part of programming, I know, but still discouraging when something silly like this can change a simple project to a huge one. If I could just get a 3D sphere to look nice (seems simple, eh?), this pool game would be done by now. Granted, tons of others would do the same thing, if easy, in which case there would be no point for me to do it also, would already be done.

    I used to think 2D was for the "dumb" folks, and 3D was the difficult beast... now I see that "fake 3D" is where the real genius is required.
     
  28. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
    We just had this problem too, deleting all other quality settings but the desired one fixed it, it was for the web viewer
    however. Unity seems to not take the correct quality setting to build at times.
    Just remove all the ones you do not want and build again and it should work.

    Edit: if your pool game is not too performance taxing , you could try our Super Sampling,
    theres no less edges than that ; ) Link
    We are also working on cheaper AA solutions at the moment.
     
    Last edited: Jul 14, 2015
    shopguy likes this.
  29. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    Last edited: Jul 14, 2015