Is this possible

is kinda … I was always trying to find a way to mask water materials so that it doesn’t show up inside the mesh of boats etc.
It’s seems pretty limited the way it is right know but if is possible then it shouldn’t be too hard to figure out how to do the same thing for any shape.

I was wondering if it would be possible to adapt the technique used to make edge foam but instead use it to detect where the transparency should start in order to mask the inside… or is that what you already tried in your previous attempt?