How do I replicate this material effect?

In this video there some sort of sphere mask-like material effect being used to make that cylindrical object disappear then reappear. It happens again with a larger series of objects later in the video. I believe it involves a sphere mask, but I would like to know if anyone knows how to replicate the effect, or is aware of a tutorial online that teaches one how to do this. Thanks.