DistanceToNearestSurface AO on Material Editor

Hi!

Hope you are fine.

I was jumping into the LIghting Masterclass from a few years ago Lighting with Unreal Engine Masterclass | Unreal Dev Day Montreal 2017 | Unreal Engine - YouTube and I got interested in the AO based on DistanceToNearestSurface presented at the 30 min mark You can see a capture below.

However, Im having a bit of a hard time reproducing it and I dont find a suitable AO implementation where the node can be applied.

Does anyone have an idea of how to do it?

Thanks!

ao|690x315