PDA

View Full Version : Rendering multi mattes



davegmac
01-22-2015, 09:47 AM
There must be a way to render multiple mattes based on materials and not just mesh layers. Currently to render out different mattes I can only do one at a time and its very slow. Most other 3d apps allow me to set up multiple render layers and I can spit them all out at once. Is there a way to do this with LW?

Sensei
01-22-2015, 10:08 AM
Take a look at this video tutorial
https://www.youtube.com/watch?v=N4UuUaJbV18

Greenlaw
01-22-2015, 10:51 AM
Here's a cheap and simple way to do it. This' rgbaM trick' good for creating up to four mattes in a single file:


Select the first item(s) and enable Matte Object and set it to 255 red. Set the Alpha Channel for the item to Constant Black.
Select the second item(s) enable Matte Object and set the color to 255 green. Set the Alpha Channel to Constant Black.
Select the third item(s) enable Matte Object and set the color to 255 blue. Set the Alpha Channel to Constant Black.
Select the fourth item(s), enable Matte Object and set the color to full black. Set the Alpha Channel to Item Surface.
Disable all lighting, shadows, fog, etc. You don't need any of this because Matte Objects are 100% luminous.
Render. This gives you four mattes in a single render with perfect antialiasing.

If you're using Fusion, plug the rendered image into a Bitmap Mask node and select the color or alpha channel for the matte you want to use.

If you're in After Effects, use Set Channel and set each channel to the color you want to use as the matte you want. For example, if you want to use the red matte, set Red to Red, Green to Red, and Blue to red. This will give you a black and white matte based on the red channel. If you want the matte in the Alpha channel, set the channels to the Alpha.

If you need additional mattes, just make another rgbaM pass. If you don't need to generate dozens of mattes, this method is quick but not so dirty. :)

Hope this helps.

I have an example image here using this rgbaM trick for an environment using Instances:

http://forums.newtek.com/showthread.php?133274-The-Brudders-2-Production-Log-%28Well-sort-of-%29&p=1317610&viewfull=1#post1317610

G.