Vertex painting - exclude vertices that are not in "line of sight"

Hi, I’m trying to vertex paint all meshes to same value. There is bigger map so I set brush size to max so it could be done quickly, but problem is its painting all vertices, even those who are no in “line of sight” (vertices that are at the bottom connected to floor, floor vertices that are covered with mesh included). Is there way to exclude those vertecies from painting ?