Use material (rather than texture) as Opacity Mask on another material?

I’m trying to use an alpha-only render of a video as an opacity mask on a material which plays an RGB version of the same video (so that the black background of the video is transparent). By breaking out the Opacity Mask I can do this with a Texture Sample, but can I make a material the opacity mask instead of using a texture? I’d love to simply duplicate my material containing the RGB video texture, substitute the alpha-only video, and then use the resulting material as an opacity mask. I’m pretty new to this, so thanks for any help!

You can’t directly use a material in another material. However there are other ways to easily achieve this:

  • If you simply want to adjust an input (texture, value, etc.) you don’t have to create a new material at all. Instead you can use a material instance to selectively override input parameters.
  • If you want to reuse parts of a material in various materials you can use a material function.

Thank you, the material function is exactly what I needed.