Material that hides certain objects behind it.

Hello, I couldn’t find it anywhere - maybe because I can’t put it into the the correct words, I don’t know.

Anyways, I came up with an idea for my project to create “magical binoculars” and I want that it hides any flagged material when I look through them.

Like in this video : https://www.youtube.com/watch?v=Crign72zU3k&feature=youtu.be - but in reverse. Instead of showing the cube that isn’t there, I would like to hide the cube that is there.

Can you point me how I should go about this ;)? Thanks.