How to detect transparency or colour on a mask?

I’m making a top-down 2D map and figured it’d be much faster to paint a collision mask to determine where the player can and can’t go. I could then trace from the cam to the mask to determine whether the area was walk-able or not. However I can’t work out how to find the opaque/transparent parts of a material. I could cut around in a 3D modelling program but that would take much longer and would need to be re-modeled after every change.

If not by alpha, is there a way to get the colour of a material from a location or line trace? Or another solution I haven’t thought of?

Maybe this will be usefull for you

Thanks Redbox, reading the render target definitely seems worth investigating, thanks for sharing!