Welcome, Guest.
Username: Password: Remember me

TOPIC: Marty McFly's Ambient Obscurance (MXAO) with IL

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #1

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 759
  • Thank you received: 814
MXAO 2.0 Release Image by Pascal Gilcher, auf Flickr

Overview

MXAO is a SSAO algorithm designed to be the perfect replacement for faulty AO implementations in modern games. To spice things up, it can also calculate Indirect Lighting. The performance and scalability allows almost GI-like scenes in some cases. Most noteable features are:

1. Scalability. It can both apply little shading almost for free or heavy shading for screenshots to completely change the look of the scenery. At low settings, its fps drop is not noticeable on GPU's like GTX 970 where HBAO+ or similiar algorithms dip the fps quite a bit. I managed to get 60 fps on a GT920.
2. To reduce the amount of needed post-blur, MXAO uses a non-random sampling distribution. Instead, it uses a 16x16 bayer matrix as distribution lookup combined with a fine-tuned algorithm to improve variance.
A lot of AO implementations reduce their effective sample count because many samples land on the same positions so the result is way more noisy than on other implementations with the same sample count. Due to the nature of the bayer matrix, the resulting pattern needs a lot less blur for completely smooth shades. (64 samples: 3 pixels radius for bayer, 8+ pixels radius for randomized samples).
3. The robust implementation allows for very wide-range AO with little decrease in performance due to minimum cache trashing. Again, a lot of AO shaders perform fairly fast for moderate sampling ranges but kill the performance for wide-range sampling. This is one of the most noteable features of the ENBSeries AO.
4. Reliable even with bad input data. Alchemy SAO for example needs very accurate linearizing function to function properly, while algorithms such as the Crysis SSAO run on almost everything. MXAO performs likewise.

Complete documentation PDF included in file.

Download

1.0r (mediafire)
1.1r (mediafire)
1.5.7r (pastebin)
2.0 (mediafire)(ReShade 3.0)
Last Edit: 3 months 1 week ago by Marty McFly.
The administrator has disabled public write access.
The following user(s) said Thank You: crosire, aufkrawall, matsilagi, CeeJay.dk, NattyDread, robgrab, Midhras, MaxG3D, SpinelessJelly, Ganossa and this user have 25 others thankyou

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #2

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 759
  • Thank you received: 814
Feedback?
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #3

  • robgrab
  • robgrab's Avatar
  • Offline
  • Posts: 125
  • Thank you received: 21
Just downloaded it. How do I install it? Do I use one of the older Reshade dlls or does it work with Reshade 2.0?
Last Edit: 1 year 2 months ago by robgrab.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2644
  • Thank you received: 1517
robgrab wrote:
Just downloaded it. How do I install it? Do I use one of the older Reshade dlls or does it work with Reshade 2.0?
Remove all shader files and install this one instead. Does not matter which ReShade version you are using.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: robgrab, Marty McFly

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #5

  • aufkrawall
  • aufkrawall's Avatar
  • Offline
  • Posts: 74
  • Thank you received: 8
Fantastic job, Marty!
The AO looks very believable and is very clean in both still image and in motion.

Tested it in BF4:


Performance is totally ok as well.

Only thing I had to change was to set #define fMXAONormalBias to 0.4 to avoid some stripe pattern shimmering for some areas in motion.

I hope some game developers will notice this and maybe help them to implement better SSAO solutions by themselves.
The administrator has disabled public write access.
The following user(s) said Thank You: Marty McFly

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #6

Thanks for your work!
I'm just amazed how flexible config that helps to tweak a shader.
Have some questions:
Warning: Spoiler! [ Click to expand ]


There are tweaked version of MXAO. I have stable >30 FPS in Warframe.
My PC: 2.3ghz + geforce 525m
Screenshoots:
Warning: Spoiler! [ Click to expand ]

Config:
Warning: Spoiler! [ Click to expand ]
Last Edit: 1 year 2 months ago by Crystrex.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #7

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 759
  • Thank you received: 814
I kicked that out, didn't look good in all cases.
And why on earth did you set blur sharpness to 0.0? That defeats the whole idea of depth aware blur. Also, why setting the normal bias to 0? That is exactly there to cover artifacts like those I see in your screenshot. If you want stronger AO, raise the AO amount but don't lower normal bias to below 0.2.
The administrator has disabled public write access.
The following user(s) said Thank You: jas01

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #8

  • WLHM15
  • WLHM15's Avatar
  • Offline
  • Everything started from the end
  • Posts: 31
  • Thank you received: 7
There's a way to do it better, find it - Thomas A. Edison

This is really a awesome work,
I just tested it, at Call of Duty : Modern Warfare 2 Game.
With ReShade 2.0 .dll, no color correction and no AA (really sucks :silly: ). Just single shader, tweaked and run..

Here the result.
Warning: Spoiler! [ Click to expand ]


Warning: Spoiler! [ Click to expand ]


The quality is amazing, it do so well, no more blurry screen.
The performance is really great, it run more fps than HBAO or Alchemy SAO in same quality. And IL make the fps drop, but not to much.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #9

Thank for answer. The idea was to maximize FPS with any methods. For my eye, without debug mode i cannot see big difference between default sharper AO and 0.00. But fps drop around 5-10.
I'm continue to experimenting and fix this values.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #10

  • kanuuna
  • kanuuna's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 2
Pardon the aliasing, but I thought I'd post my results. I felt like downloading Crysis just for this.
Warning: Spoiler! [ Click to expand ]

ON

Warning: Spoiler! [ Click to expand ]

OFF

Really clean work. This is impressive.
The administrator has disabled public write access.
The following user(s) said Thank You: aufkrawall

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #11

Just tested and damn it looks good, but sadly only in still images and when no fog/smoke/windows are around. The problem is severe bleeding, which can be seen in a couple of shots here already. Bleeding makes all of these fancy AO techniques unusable for normal gameplay imo, is there no way to get rid of it completely or even make it far less noticeable?
Last Edit: 1 year 2 months ago by GroinShooter.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 2 months ago #12

  • roxahris
  • roxahris's Avatar
  • Offline
  • Refreshing yet disheartening bucket of water
  • Posts: 16
  • Thank you received: 1
This is incredible! It looks fantastic in almost everything I've tried it in and, thus far, supersedes every other option available for injection.
To follow on with the screenshot parade, here is a shot of the original Final Fantasy XIV. I'm stunned!
Last Edit: 1 year 2 months ago by roxahris.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #13

  • aufkrawall
  • aufkrawall's Avatar
  • Offline
  • Posts: 74
  • Thank you received: 8
kanuuna wrote:
Pardon the aliasing, but I thought I'd post my results. I felt like downloading Crysis just for this.
Impressive demonstration!
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #14

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 759
  • Thank you received: 814
GroinShooter wrote:
Just tested and damn it looks good, but sadly only in still images and when no fog/smoke/windows are around. The problem is severe bleeding, which can be seen in a couple of shots here already. Bleeding makes all of these fancy AO techniques unusable for normal gameplay imo, is there no way to get rid of it completely or even make it far less noticeable?

Absolutely not. In regular engines, this is done by rendering AO etc before transparent objects or particles. As we can't do it and most of the effects don't differ in their color information from the surrounding environment, there is no possibility to separate those. Just because our eyes can distinguish between this doesn't mean an algorithm can. If I could write something on that level of content awareness, I'd sell it to the military and they would buy it. However I proposed some possibility to find out these areas by checking depth and color info. Most area with fog /smoke have largely same colors but their depth info is highly different (because the objects behind it are not flat) but that won't work in all cases.
The administrator has disabled public write access.
The following user(s) said Thank You: GroinShooter

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #15

  • roxahris
  • roxahris's Avatar
  • Offline
  • Refreshing yet disheartening bucket of water
  • Posts: 16
  • Thank you received: 1
I think GeDoSaTo implemented a function to let the user define a specific stage of the rendering process (i.e. before transparencies and the UI) at which an AO shader would be applied. However, that would require porting the shader over, which is both a fair amount of work (it's probably not as extensible as ReShade), and would have to be allowed by the license.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #16

  • NotAgOat
  • NotAgOat's Avatar
  • Offline
  • Posts: 9
  • Thank you received: 4
I replaced the default reshade.fx in the reshade folder with this one. I do not see the effect in the effects panel. Am I installing this incorrectly?

Why is this replacing default files anyway? Why not add new effects to marty's shader folder?
Last Edit: 1 year 1 month ago by NotAgOat.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #17

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2644
  • Thank you received: 1517
This is a fully standalone effect currently and cannot be used with the rest together (by default), nor can it be used with the assistant tool.
Cheers, crosire =)
Last Edit: 1 year 1 month ago by crosire.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #18

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 759
  • Thank you received: 814
NotAgOat wrote:
I replaced the default reshade.fx in the reshade folder with this one. I do not see the effect in the effects panel. Am I installing this incorrectly?

Why is this replacing default files anyway? Why not add new effects to marty's shader folder?

So people can test it before I integrate it in the Framework. When I do that, I' have to rewrite all the other AO shaders as well so this is a bigger bunch of work as I'm willing to do atm.
Last Edit: 1 year 1 month ago by Marty McFly.
The administrator has disabled public write access.
The following user(s) said Thank You: acknowledge

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #19

  • NotAgOat
  • NotAgOat's Avatar
  • Offline
  • Posts: 9
  • Thank you received: 4
Oh, I see. Thanks.
The administrator has disabled public write access.

Marty McFly's Ambient Obscurance (MXAO) with IL 1 year 1 month ago #20



MXAO : fMXAOSampleRadius = 18, iMXAOSampleCount = 255
abload.de/img/deadislandgame_x86_rw2ypdr.png[

HBAO in GeDoSaTo (Link)
abload.de/img/screenshot_2014-10-28w3po8.png

The brightness difference is irrelevant of course but I think the latter occludes the near objects a bit better than MXAO (see the shadows under close rocks) with less self-occlusion. While MXAO does a slightly better job for distanct objects.
Nothing that couldn't be fixed by tweaking a near plane parameter I guess... If it existed because I don't think you included a way to tweak it. I could only see a farZ one.

Other than that the performance is great !
In that last shot that I took way back in 2014 I remember the fps was crawling in the 10 fps (there was downsampling in the mix but even without it would kill the framerate with HBAO maxed out) while MXAO is performing really nicely even at high settings (the bayer pattern trick I guess)
Last Edit: 1 year 1 month ago by Boulotaur2024.
The administrator has disabled public write access.
The following user(s) said Thank You: Marty McFly