How to get the Opacity Mask in Blueprint?

I’m trying to render the Opacity Mask into a render target to see if the object that I’m clicking is visible or not, but it seems that using the Get Material node only returns the Emissive.




I can see that there seems to be a way in C++ but that’s out of my league.
If I put the Base Color of the Cylinder Material into the Emissive then it shows a flat pink shade.

I want to get the Opacity Mask and the Opacity into the Render Target so that I can do this from this question How to make Line Trace ignoring transparent part of a texture? - #4 by Marcis.