Using FFT to determine game sharpness as measured by high frequency detail *spawn

Discussion in 'Console Technology' started by L. Scofield, Feb 22, 2015.

  1. Billy Idol

    Legend Veteran

    Joined:
    Mar 17, 2009
    Messages:
    5,950
    Likes Received:
    779
    Location:
    Europe
    I agree with you, but what you say holds for every single tec aspect of game graphics...the per eption of the final reception is subjective.

    But this is not the point of the console technology sub forum I guess...here the tec only counts.

    I think it is an interesting way to find a way to judge the IQ of games.

    I am wondering if it is better to look at the spectrum of the FFT, i.e. Convert the 2d plot into a 1D line plot...this is actually what people do to investigate the scales in a turbulent flow field.

    I hope I find time this weekend to try this out...
     
    #21 Billy Idol, Feb 23, 2015
    Last edited: Feb 23, 2015
  2. Scott_Arm

    Legend

    Joined:
    Jun 16, 2004
    Messages:
    14,077
    Likes Received:
    5,306
    But, this has nothing to do with rendering tech? What can you learn from it?
     
  3. VFX_Veteran

    Regular Newcomer

    Joined:
    Mar 9, 2002
    Messages:
    656
    Likes Received:
    176
    Do you have any idea what is going on in that image? Let's put it this way.. yes, the geometry is simple. But the rendering is more advanced than any game can do.. and not just now but for generations.

    The sphere test is using a more physically plausible shader, real area light, an environment sky, casting pre-number adjusting shadows, and has indirect global illumination. And it's all being path-traced, so noise is inherently introduced into the scene by default due to the Monte Carlo sampling.

    I created it as a means of controlling the scene precisely.
     
  4. VFX_Veteran

    Regular Newcomer

    Joined:
    Mar 9, 2002
    Messages:
    656
    Likes Received:
    176
    NOTE: These are camera samples but they migrate to all indirect and light samples as well. That's why the noise is cleaned up at the shader level as well as spatial aliasing.

    2 samples (i.e. 4 actual samples per pixel)
    [​IMG]
    [​IMG]

    3 samples (9 samples/pixel)
    [​IMG]
    [​IMG]

    4 samples (16 samples/pixel)
    [​IMG]
    [​IMG]

    6 samples (36 samples/pixel)
    [​IMG]
    [​IMG]

    10 samples (100 samples/pixel)
    [​IMG]
    [​IMG]
     
  5. psorcerer

    Regular

    Joined:
    Aug 9, 2004
    Messages:
    732
    Likes Received:
    134
  6. MJP

    MJP
    Regular

    Joined:
    Feb 21, 2007
    Messages:
    566
    Likes Received:
    187
    Location:
    Irvine, CA
    He's just pointing out how a sphere on a plane isn't at all representative of typical game environments. The fact that you're using an offline path tracer only strengthens his point: the artifacts that you get from high variance in a path tracer are going to be very different from the sort of noise that you would get from a grain filter (grain is much more uniform), and even more different from the regular patterns that you get from undersampling in a rasterizer.
     
  7. Shifty Geezer

    Shifty Geezer uber-Troll!
    Moderator Legend

    Joined:
    Dec 7, 2004
    Messages:
    42,958
    Likes Received:
    15,057
    Location:
    Under my bridge
    Any chance you can provide The Order images with and without post for analysis? :D

    Actually, any screenshot sans postFX can be used to compare.
     
  8. Globalisateur

    Globalisateur Globby
    Veteran Regular Subscriber

    Joined:
    Nov 6, 2013
    Messages:
    3,410
    Likes Received:
    2,119
    Location:
    France
    I have a better idea: we could do our own screenshots and comparisons if the game had an option to disable the grain filter...

    I swear It's for science's sake only! :yep2:
     
  9. Scott_Arm

    Legend

    Joined:
    Jun 16, 2004
    Messages:
    14,077
    Likes Received:
    5,306
    Should be pretty easy with PC games.
     
  10. VFX_Veteran

    Regular Newcomer

    Joined:
    Mar 9, 2002
    Messages:
    656
    Likes Received:
    176
    I hear ya.. I only posted to verify the algorithm really. I just wanted to see it work in a very controlled environment. It wasn't meant to represent games. But I have added the source code if anyone wants to do their own analysis.
     
  11. cifa

    Joined:
    Feb 24, 2015
    Messages:
    2
    Likes Received:
    2
    Uhm I have a couple of doubts here.

    Both Durante's and VFX_Veteran's plots look a bit weird compared to fourier transform I usually generate. More precisely they have a strange colormapping that seems to clamp higher values to 1 (hence that red blotch for low freq and some times higher frequency).
    For example, for the image provided by VFX_Veteran

    [​IMG]

    The plot as I would generate looks more like this:
    [​IMG]

    (Note that as usually done I have here represented the log of the magnitudes for visualization purposes).

    To me this looks much more informative and tells much more about an image.


    Am I wrong?

    Secondly, I can't see this test as a rigorous way to compare two different games postproc blur/grain/etc.. There are so many things that can make an image have hi/low freq rather than those effects. This starts to make more sense, IMHO, when the images are incredibly alike or if you want to compare the effects of different sets of postproc for the same pic.


    I am pretty much a newbie in the field, so probably I've made some terrible mistakes in the above, so please correct me if I am wrong :)
     
  12. cifa

    Joined:
    Feb 24, 2015
    Messages:
    2
    Likes Received:
    2
    I didn't see VFX_Veteran's code. The values are obviously correct, but the visualization (imshow) is done wrongly. In particular the magnitudes values are double and in such case imshow will assume they're in the [0 ... 1] range while they aren't. The quickest way to fix it is by using

    Code:
    imshow(F2, []);
    
    Or by normalizing the magnitudes right before visualization.
     
    VFX_Veteran and Shifty Geezer like this.
  13. VFX_Veteran

    Regular Newcomer

    Joined:
    Mar 9, 2002
    Messages:
    656
    Likes Received:
    176
    Yea, I didn't really put a lot of time into this. In any case, it's there for people to mess around with/optimize or whatever they want to do. I just wanted to prove that given the same image and render, increasing AA does indeed bring the results closer to a cleaner image based on reading the DFT.
     
  14. MJP

    MJP
    Regular

    Joined:
    Feb 21, 2007
    Messages:
    566
    Likes Received:
    187
    Location:
    Irvine, CA
    I can certainly ask, but I think it's pretty unlikely. Perhaps I can see if I can have a comparison as part of a future tech presentation.
     
    Shifty Geezer and Billy Idol like this.
  15. Laa-Yosh

    Laa-Yosh I can has custom title?
    Legend Subscriber

    Joined:
    Feb 12, 2002
    Messages:
    9,568
    Likes Received:
    1,455
    Location:
    Budapest, Hungary
    BTW MJP, congratulations on The Order - I recall you're at RAD, right? - amazing work!
     
  16. chris1515

    Veteran Regular

    Joined:
    Jul 24, 2005
    Messages:
    4,522
    Likes Received:
    3,350
    Location:
    Barcelona Spain
    Great job! I enjoy your game and great graphics and sound design! Now I need to platinum it.
     
  17. VFX_Veteran

    Regular Newcomer

    Joined:
    Mar 9, 2002
    Messages:
    656
    Likes Received:
    176
    Oh absolutely agree. I wasn't trying to relate the two. I was just providing a proof of concept in my own environment to verify that the DFT is working. And to also provide the code which Durante didn't post on NeoGAF.

    Congrats on the game btw! I'm hearing excellent things about the graphics from our artists at our studio!

    I see you know Adam Martinez, Zap and Christophe Hery.. :)
     
  18. MJP

    MJP
    Regular

    Joined:
    Feb 21, 2007
    Messages:
    566
    Likes Received:
    187
    Location:
    Irvine, CA
    Thank you everyone for the kind words! Please don't let me derail the thread. :)

    Haha, yes indeed! Zap's talk about mental ray a few years ago at SIGGRAPH was amazing, I was so glad that I was there to see it in person.
     
    VFX_Veteran likes this.
  19. brunogm

    Newcomer

    Joined:
    Apr 26, 2013
    Messages:
    138
    Likes Received:
    22
    Sharpness as defined by Imatest? Then there would be a need to find good Modular Transfer Functions on each render step a game uses. Even so "-ness" are psychology effects... Maybe search for SchubinCafe talks?
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...