Path to mask (ae)

https://www.youtube.com/watch?v=Iz2GRaCveFs

Of course mask can be on some other layer.

Similar (Shape 2 mask)
https://youtu.be/ILqS7qjC9Jo