Marty McFly's Ambient Obscurance (MXAO) with IL

  • ShoterXX
More
6 years 6 months ago #381 by ShoterXX Replied by ShoterXX on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Yeah, I can agree with most changes for the most part. It's just that I'd prefer some way to sharpen the effect without having to crank up everything very high, even if at the expense of minor artifacts.
As for TSS, it's more like 4K needs it because the card already barely handles 4K :P I can take the trade-off.

On a side note, TSS helps mitigate issues with large radii. I know MXAO is not meant for that kind of stuff, but still looks good with it :silly:

Regardless, great work.
The topic has been locked.
  • Marty McFly
  • Topic Author
More
6 years 6 months ago #382 by Marty McFly Replied by Marty McFly on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Thank you:)

Well, the visual diff in no debug mode between fullres AO and lower res one is minimal, I guess you could do more with TSS + downsampling.
The topic has been locked.
  • Martigen
More
6 years 6 months ago #383 by Martigen Replied by Martigen on topic Marty McFly's Ambient Obscurance (MXAO) with IL

Marty McFly wrote: Sooo, the time has come to make it public. I'll push it to the github repo within the next days.
Behold, MXAO 3.0:

www.mediafire.com/file/zaoo6yy5b7y2hq5/MXAO30.zip

Thank you Marty for your hard work and the best AO shader ever!
The topic has been locked.
  • Uncle Crassius
More
6 years 6 months ago #384 by Uncle Crassius Replied by Uncle Crassius on topic Marty McFly's Ambient Obscurance (MXAO) with IL
What Martigen said. Other than that, I kinda liked the settings for coarse and fine AO being side by side in the earlier version.
The topic has been locked.
  • Marty McFly
  • Topic Author
More
6 years 6 months ago #385 by Marty McFly Replied by Marty McFly on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Well, thank you. The two layer controls being side by side is a problem, as the float2 defaults to 1.0 0.0 instead of 1.0 1.0. Figured people might not get how the feature works.
The topic has been locked.
  • Uncle Crassius
More
6 years 6 months ago #386 by Uncle Crassius Replied by Uncle Crassius on topic Marty McFly's Ambient Obscurance (MXAO) with IL
I see. Thanks for clarification.
The topic has been locked.
  • GP-Unity
More
6 years 6 months ago #387 by GP-Unity Replied by GP-Unity on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Thanks for another great update :cheer:

Just a slight problem with indirect lighting. In my experience, the blue channel for light bouncing is generally strong. I try my best to get indirect lighting balanced across all colours in a game.

The ice cave in rise of the tomb raider, although it has a rather low degree of blue to the ice models, the indirect lighting is a harsh blue. Other colours are perfectly balanced. This is the same with arkham city, where batman although every so slightly blue in colour, also bounces off pretty harsh blues. I'm aware the logic is to just lower saturation or lighting amount, but other colours get reduced to the point of almost not being visible. I also always keep MXAO at the top of effects order to be clear.

Is there a way to keep the blues lower? Perhaps an RGB channel for indirect lighting?
The topic has been locked.
  • Marty McFly
  • Topic Author
More
6 years 6 months ago - 6 years 6 months ago #388 by Marty McFly Replied by Marty McFly on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Hmm I suppose this could be an effect of the eye being not really sensitive to blue lighting so when it's strong (which doesn't happen often), you immediately find it more bothering than other colors if they were just as intense. Plus my blending mode tends to oversaturate areas if hue of IL and surface below matches. I'll experiment a bit, will keep you posted.
Last edit: 6 years 6 months ago by Marty McFly.
The following user(s) said Thank You: GP-Unity
The topic has been locked.
  • ShoterXX
More
6 years 6 months ago #389 by ShoterXX Replied by ShoterXX on topic Marty McFly's Ambient Obscurance (MXAO) with IL
On line 342:
. . . . float searchRadiusScaled
did you mean float2?

Also, the above problem. Could be an issue due to MXAO not taking per-channel luminosity into account. Blue is perceived as the darkest channel, so a slight blue might mean a large difference between channels.

That, or I could be talking out of my head.
The following user(s) said Thank You: GP-Unity
The topic has been locked.
  • GP-Unity
More
6 years 6 months ago #390 by GP-Unity Replied by GP-Unity on topic Marty McFly's Ambient Obscurance (MXAO) with IL

Marty McFly wrote: ...Plus my blending mode tends to oversaturate areas if hue of IL and surface below matches...

This makes sense. For tomb raider, the extruding ice is colouring itself. Same goes for arkham city, certain parts of batmans body (his body appears grey but some blue information is visible) make lighting contact with each other. In between batman's arms and chests for example, blues are visible.
The topic has been locked.
  • GP-Unity
More
6 years 6 months ago #391 by GP-Unity Replied by GP-Unity on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Tried to find the best middle ground for indirect lighting. As you can see, the brown walls bounce its colours nicely along the staircase and white pillar thingy:



The pretty strong blues both between batman's body parts and the vents (using same settings as first image):



Would've shown how nice the red carpets look inside the church building but that buildings blocked off in game for now
:side:
The topic has been locked.
  • ShoterXX
More
6 years 6 months ago #392 by ShoterXX Replied by ShoterXX on topic Marty McFly's Ambient Obscurance (MXAO) with IL

Blue looks less saturated than it really is. If IL oversaturates based on the surface (the scene matches in hue), it becomes an increasingly stronger tone.
The topic has been locked.
  • Marty McFly
  • Topic Author
More
6 years 6 months ago #393 by Marty McFly Replied by Marty McFly on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Some code is multiplicative, so if IL and the rest have similar colors, it's similar result to having higher gamma value which saturates colors. I think I already have an idea how to retain original colors. A blending mode that doesn't change hue or saturation at all if IL and color are same is ideal, no?
The topic has been locked.
  • ShoterXX
More
6 years 6 months ago #394 by ShoterXX Replied by ShoterXX on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Pretty much, though, "ideally-ideally" IIRC, you should actually lose saturation as it gets brighter.
The topic has been locked.
  • p6kocka
More
6 years 6 months ago - 6 years 6 months ago #395 by p6kocka Replied by p6kocka on topic Marty McFly's Ambient Obscurance (MXAO) with IL
I´am playing Xcom 2. Is this normal to have this efect here pls when loading a save?: There are AO lines visible when you look closer.
pasteboard.co/GPmsba2.png
And this is ingame picture with AO visible also in fow of war area:
pasteboard.co/GPmt048.png

Can this be fixed somehow? Is this normal?
Last edit: 6 years 6 months ago by p6kocka.
The topic has been locked.
  • robgrab
More
6 years 6 months ago #396 by robgrab Replied by robgrab on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Fantastic work, as usual, Marty! I tried 3.0 on Divinity Original Sin 2 last night combined with the game's built in AO and the results were amazing! Performance was much improved too. The only problem, which I know can't be fixed in a post process AO solution, is the bleed through in menus and transparent surfaces. It's a minor inconvenience in what is otherwise a near perfect solution. Keep up the good work!
The topic has been locked.
  • Marty McFly
  • Topic Author
More
6 years 6 months ago - 6 years 6 months ago #397 by Marty McFly Replied by Marty McFly on topic Marty McFly's Ambient Obscurance (MXAO) with IL

p6kocka wrote: I´am playing Xcom 2. Is this normal to have this efect here pls when loading a save?: There are AO lines visible when you look closer.
pasteboard.co/GPmsba2.png
And this is ingame picture with AO visible also in fow of war area:
pasteboard.co/GPmt048.png

Can this be fixed somehow? Is this normal?


That's entirely normal for postprocessing injectors like ReShade - the depth buffer only contains the raw distance of the objects, all those fancy things like fog are invisible to these effects (same goes for any stylization shaders like your first picture). Because of this, AO is usually drawn before that, so those filters are on top of AO. With ReShade, the order is not scene - AO - post filters but scene - post filters - AO which is wrong. There's no generic way to compute from the image where fog is or any other transparent things. If you could, you'd essentially program a human brain. In realtime.

robgrab, thank you :) Maybe I'll find a solution for that one some time ... who knows.

EDIT: Came up with this blending modification:

pastebin.com/KS6rD4eH

Please report if it's more fitting for you requirements. It also takes care of overexposure, but as dark colors tend to be almost gray, some areas lose some color.
Last edit: 6 years 6 months ago by Marty McFly.
The following user(s) said Thank You: GP-Unity
The topic has been locked.
  • ShoterXX
More
6 years 6 months ago - 6 years 6 months ago #398 by ShoterXX Replied by ShoterXX on topic Marty McFly's Ambient Obscurance (MXAO) with IL
About to test it but I'm pretty sure it's borked:

float lumcoeff = float3(0.2126, 0.7152, 0.0722); :silly:

EDIT: I managed to miss the commented GI declaration. Debug was broken and wouldn't compile.

EDIT 2: After fixing it, tested it, looks pretty great on blue-on-blue and red-on-red scenarios. However, it's not always less saturated than before, quite the opposite, but still better looking.
Last edit: 6 years 6 months ago by ShoterXX.
The topic has been locked.
  • GP-Unity
More
6 years 6 months ago #399 by GP-Unity Replied by GP-Unity on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Thank you so much but mxao is failing to compile properly :(
The topic has been locked.
  • ShoterXX
More
6 years 6 months ago - 6 years 6 months ago #400 by ShoterXX Replied by ShoterXX on topic Marty McFly's Ambient Obscurance (MXAO) with IL
Replace line 494 with:

float3 lumcoeff = float3(0.2126, 0.7152, 0.0722);

and line 506 with:

float3 GI = max(0.0,1.0 - aoil.www + aoil.xyz);

Note that debug mode is not working as it should with this quick fix.
Last edit: 6 years 6 months ago by ShoterXX.
The following user(s) said Thank You: GP-Unity
The topic has been locked.
We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.