How to make everything inside a 3D box visible and outside of 3D box invisible

Follow my comment- I detailed the process and it would work for that use-case.