Ambient occlusion for 3D boxes


How can i add ambient occlusion for the 3D boxes?

not alot to say lol i just want an effect like in minecraft where it uses vertex colors
if it even is possible