Mask for Vray infinite plane

I wonder what is the best way to make small portions of V-Ray infinite plane transparent so I can show structure below ground level. I have used V-Ray clipper to create holes and that part works fine. However I want to visualize underground structure. For that I two V-Ray infinite planes: one for the ground level and the other for the underground floor level. The upper plane if partially transparent and the lower plane is fully visible.

I can get almost acceptable results wit this, but then again it would be nice if I could use mask where the upper floor is solid while maintaining partial and full transparency on certain portions. Only problem with my current method is that I get double ground shadows.

So it would be nice to select from which objects the lower V-Ray plane receives the shadows

Maybe apply a VRayMtl with a VRayDistanceTex in its opacity slot to the top plane. Set inside/outside solid and separate, with inside as white and outside as black. Afterward, you control the “cut” via the object you selected in the VRayDistanceTex. Check the attached sample scene.
sample.7z (53.6 KB)

Thanks, it worked.

However I it looked a bit better when I didn’t use pure white as outside color. The latest RGB level is 176. I’m using Max2022, so I could not open the sample file, but the explanation was good enough to get it right. What does the Distance value do?

It controls the shading effect based on the distance of the objects in the list. When using Inside/Outside, it will not be evident (because it uses the objects’ edges), but with Near/Far color it looks like this: