System so the player only see's what he's supposed to.

I want to make a system where the player only see’s what he’s supposed to what I mean bye this is, in third person camera mode if there is a wall I want what’s on the other side to not be visible. Where you would usually see the other side because of 3rd person like the ground and some grass I want to make that blacked out or greyed out (ill decide on effect later). I looked at the FOG tutorial and it’s just not what i’m trying to do it is halfway. Would copy and pasting the ai perception source just taking out and adding what I need be a good place to start? Or is there a easier way? I did watch a video where someone got the FOG running very efficiently to where you could make a full game ontop of it, but he used a different method at the rendering point than the original guy that made the tutorial.