ARK.KRA - VBAO - Visibility Bitmask Ambient Occlusion

Basically, Output Mode 0 was designed for those who want AO everywhere like in older games. The default UE5 render pipeline makes AO heavily dependent on the scene’s light, which is more physically correct but often lacks that depth people are used to from older titles.

That is exactly why I created heuristics like Multi Bounce and Fog Attenuation. They try to get closer to physically correct behavior without killing the AO as much as the standard UE5 compositing does.

However, if you prefer the standard UE5 behavior since it is as physically correct as it gets, you can use Output Mode 1. It uses the engine’s native compositing instead of mine.
The trade off is that you won’t be able to use Multi Bounce or Fog Attenuation because those heuristics only exist within my custom compositing setup.

Yeah, the problem is that none of outputs gives me the correct AO.

With 0 adds too much in vertical walls and lacks inside wheels rims/treads, but polo trunk and overall great thanks to multibounce.

With 1 vertical walls are correct, rims/tread more dark, but due misses multibounce it adds AO where it not should like the trunk and other zones.

But well, waiting for the new update, will see if can fix this scenarios in some way or new options so can get the best from both worlds.

//

About the idea of a curve in PostProcess for the VBAO yeah if possible much better.

Yeah, I guess this is probably the best we can get right now without sacrificing performance, but I’ll see what else I can improve where possible.

I understand your selling point is being perfomant as native SSAO and better quality, but for my use case no problem to be 0.8-1.0ms in quality 2 if that gives more realistic, aproximate and adds in hiden zones. Maybe add more quality options or a preset for Perfomance:0 / Fidelity:1.

//

Any ETA for the next update?

Btw, besides intensity control on light/mid/dark, other features will be nice:

Color
Blend Type (Multiply, Overlay…)
Bias / Offset / FallOff (to shift the light/darken)
This may help to make the vertical walls more soft/smooth.

//

EDIT: Also noticed the AO not scalates according to distance, like remains the same if you are close up to a wall or far, when it should be less.

Testing debug mode i found that on editor without realtime enabled all looks with AO, but if enable realtime or play ingame this hapens, transparencies and wheels appears like that, is that a bug or it is normal?

And in other car tire trads ok but sides looks texured:

Maybe i have something wrong with wheel / transparency materials? Or debug mode is bugged?

Im doing some benchmarks and i found something, using 4060 Laptop.
VBAO Quality 3: 0.62-0.72ms

But im testing GTAO with some tweaks and only does 0.22-0.3ms if i sum the 4 stats and seems gives better feeling, Screenshot of the car with VBAO and GTAO modified

Screenshot of ingame with GTAO Stats

The settings for best GTAO perfomance (0.22-0.3ms):

r.AmbientOcclusion.Method=1

GTAO available params | Preset:Perfomance Setup

r.GTAO.Downsample=1
// (Def:1.0) Half-res render (biggest perf: ~40–50% faster, minor quality loss)
r.GTAO.FilterWidth=2.0
// (Def:5.0) Min filter size (default 5; lower = less blur cost)
r.GTAO.NumAngles=2
// (Def:4.0) Min angles (2–4 range; lowest = fastest horizons)
r.GTAO.UseNormals=0
// (Def:0.0) Skip normals (faster, flatter AO)

In fact, now, with default GTAO values i get similar perf than VBAO, far from that 3ms.

What happened? or im missing something?

Hey Davit, thanks for the feedback and ideas!

About the presets, VBAO already includes 4 quality tiers, with Quality 2 currently running at around 0.65ms. Because of this, adding separate Performance or Fidelity presets would be a bit redundant right now.

For features like color tinting and blend modes like Overlay, my goal is to keep the plugin strictly physically based. VBAO already calculates proper multi-bounce color bleeding under the hood. Mathematically, AO is an occlusion mask, so it strictly needs to use Multiply against the indirect lighting buffer. Adding manual colors or Photoshop style blend modes would break the PBR pipeline and make things look unnatural.

As for Bias, Offset, and FallOff, it is similar to what we discussed earlier about luminance controls. If you want to soften the vertical walls or adjust the shadow gradient, using the engine’s built in postprocess curves is a much better and more optimized way to handle it.

Finally, about the AO not scaling with distance. This is actually the intended, physically correct behavior. VBAO calculates the radius in world space. Think of it like real life: if you move your head closer to a corner and then step back, the physical size of the shadow in that corner stays exactly the same. The scaling effect you mentioned is actually a well known artifact from older SSAO methods that calculated the radius in screen space pixels rather than world space.

Regarding the next update, I’m considering a better multi-bounce algorithm for a future update, but there’s no ETA yet as I have other plugins to maintain and the current AO quality is already solid for most users.

Debug mode is for internal testing only and isn’t meant for regular use or gameplay, which is why it’s not in the documentation. It works by forcefully overriding the buffer, so artifacts in real time or in game are expected. It is not a bug, just not a feature for the end user.

You’re comparing almost max quality VBAO with heavily stripped down GTAO, so of course you’re going to see a big performance gap.

Like I said before, the original GTAO vs VBAO test was just a general comparison of performance vs quality under comparable settings. Your results can vary a lot depending on your hardware, scene and config.

What you did with GTAO settings is exactly why it got so fast.

First, you enabled half resolution rendering. That means you cut the AO resolution in half, which kills small contact shadows and introduces leakage after upscaling. It’s especially noticeable in areas like the car interior. I run VBAO in full resolution only, and that’s kind of the point, getting better quality and performance without dropping render resolution and without all those artifacts.

Then you lowered the quality across the board. Your denoising is minimal now with FilterWidth set low, you only use 2 angles for horizon search, and you disabled normals completely. At that point it’s barely even physically meaningful AO anymore, you basically gutted the algorithm.

The result is not actually better, even if it feels like it at first glance. Instead of sharp and accurate contact shadows with proper falloff, you get blurry blobs with poor depth definition and a bunch of artifacts. You can get a very similar result with a basic SSAO and a large radius, and that would likely be even faster than both methods.

It looks like you’re misunderstanding what screen space AO is for. It’s not meant to darken the whole image, fix specular issues or replace large scale shadowing. It’s a subtle screen space effect for small contact shadows that separate objects, creases, edges and add local depth.

You want to get the result of Distance Field AO from screen space solutions, but it doesn’t work that way, that’s a different thing entirely. Screen space AO is about micro occlusion, DFAO is about macro occlusion. If you want that kind of large scale shading, you should look into capsule shadows, blob shadows, or just use RTAO if performance is not a concern.

2 Likes

I did new Benchmarks with good GTAO settings, im having around 0.60-0.74 similar to VBAO:

Im using 5.7.4, no idea if EPIC improved GTAO since you did your tests, but far to be that 3ms you mention, can you confirm?.

Default GTAO Settings & Default VBAO | r.ScreenPercentage 100
// VBAO Quality 3 :: 0.62-0.72ms
// GTAO Default :: 0.60-0.74ms

With GTAO downsample enabled improves perf by x3 aprox(0.22-0.26ms), but there is some leaking light on rims and some zones looks smoothed/contrast/blob instead sharp.

//

Overall, VBAO is the winner in same conditions due gives more natural AO with similar perf. GTAO gives better wall and good car feeling placed on ground, but adds too much in some interior zones, spoiler and trunk/rear bumper.

My problem with the walls is due i use Quality:3 & Intensity:1 to give more car feeling placed in the ground to get more dark zones.

With default values the AO on vertical walls are fine but with that con.

//

EDIT:

I did some benchmarks with ScreenSpace AO with default settings:

So, update of Benchmarks with 5.7.4:

VBAO Quality 1 :: 0.42-0.54ms

ScreenSpace AO :: 0.45-0.56ms

VBAO Quality 2 :: 0.53-0.64ms

GTAO :: 0.60-0.74ms

VBAO Quality 3 :: 0.62-0.72ms

//

Can you guys confirm?

1 Like

Not sure I can really prove it in any way other than screenshots that VBAO is faster than GTAO on my side, but even if I use a standard scene with your settings, VBAO Q3 is still about 2x faster for me.

It could totally be that Epic improved GTAO in newer versions. It could also be that the newer RTX 4060 architecture removes some bottlenecks. Even if we do a rough hardware comparison, the RTX 4060 has about 15 TFLOPS while the RTX 2060 is around 6.45 TFLOPS, so it is roughly 2x faster. That means if GTAO is 0.67 ms for you at 1080p, for me it would already be around 1.34 ms, and then if we add some extra difference from scene setup, engine version, and bandwidth, it gets pretty close to the result from my screenshot.

But overall, I think you are right. If the results changed that much in newer versions and my original tests are now far from the average result, I should update the description so it does not mislead people.

Thanks a lot for testing different settings on your side!

About the incorrect shading, I am not sure it will fully give the result you are expecting, but I hope the new multi-bounce approximation version will help improve that.

Ok, from starter content, blank project, third person in 5.7.4.

GTAO Imgur: The magic of the Internet
I will say average is around 0.92 (between 0.8-1.0) (sum all)

VBAO Q2: Imgur: The magic of the Internet
I will say average is around 0.68 (between 0.6-7.4)

VBAO Q3 : Imgur: The magic of the Internet
I will say average is around 0.87, still better than GTAO.

So your VBAO in Q2 can be 20-40% faster than GTAO while giving more accurate results.

//

About GPU, mine is 4060, but laptop, around 23% faster than a 2060 desktop.
If your one is laptop too, then my one is 53% faster:

1 Like

Doing more tests i realized that when you enable GTAO or SSAO, on Stat GPU, besides the ones with “GTAO/SSAO” name, there is another process.

Is called “Composition PreLighting” and adds about 0.2ms for GTAO. With SSAO adds around 0.1ms. If GTAO/SSAO is disabled it becomes 0.