You may find this useful for your purpose Render Mask
It’s in Slovak but I think you can glean the gist of it.
Good luck!