Make objects only visible when looking into a cylinder and not from the outside.

Let’s think about the top of the cylinder like a circle surface, check the intersection point made by the line from camera view to world position of the box and the circle surface, if the distance from the intersection to the circle center <= circle radius, then return value 1. If not, return value 0, then pass it to opacity channel. You should ask this question on graphic section.