Ambient Occlusion

Ive been reading a lil bout parallax occlusion, and from what i understand
i need to use compositing and nodes to layer 3 materials, one being a blank and white image?

but how do i go about using it in blender, are there any tutorials for this?
and for the game engine?