Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Lighting & Rendering (https://simplymaya.com/forum/forumdisplay.php?f=17)
-   -   Clean mattes from object ID pass (https://simplymaya.com/forum/showthread.php?t=40781)

stwert 03-09-2014 01:05 PM

Clean mattes from object ID pass
 
3 Attachment(s)
As I understand it, creating a material or object ID pass is pretty common practice, using surface shaders with a single color (typically Red, Green, or Blue, and additional ones might be Cyan, Yellow, and Magenta so the RGB values are very straightforward). (see Fig 1 :))

What I can't figure out is how in After Effects to get a perfectly clean, accurate alpha or matte or mask for a single color. Most tutorials I can find (even high profile ones) seem to go the route of applying a "Color Key" and tweaking the color tolerance and feather. This in my experience is just guesswork and won't create a clean accurate matte.

The alpha is anti-aliased (see Fig 2 :mask:). Obviously anti-aliasing at the outside edges and between colors complicates the process, but there should still be a simple mathematical way to isolate these regions with an anti-aliased alpha.

The better way seems to remap the channels, for example using "Channel Mixer" and setting all other channels to -100 or 0 except the one you want and then using it as a luma matte? But even then, if I duplicate the process for each color and put the layers on top of each other, I get black lines at the intersection of colors and the outside edges aren't the same.

I did a very simple experiment where I have two copies of the id pass and used one as an "alpha inverted matte" of the other. This should completely eliminate the image, yet I have a fringe showing up. (Fig 3:furious:)

TL;DR: Does anyone know the RIGHT way to use an id pass? (If you say "use Nuke" I might actually take you up on that).


Thanks!:nerd:

stwert 15-10-2015 06:32 PM

1 Attachment(s)
Well, I'm here again. Still am not able to use ID passes effectively. Even the MILA matte pass built into the new mental ray render settings.

I've got a very basic comp with 2 copies of an image. Using the EXtractoR plugin, I set one to take all channels from matteA, and the other copy to take all channels from matteB. This should result in a perfect union of the two images. Instead I get a terrible line between them. Checking UnMult helps a little bit, but not completely.

I just don't get it. Shouldn't this be a perfect mathematical operation? Is After Effects just incapable of doing this and another compositing package will work?

David 15-10-2015 06:41 PM

Look like a multiplication problem to me, send me the exr if you like dave@simplymaya.com I'll try the same thing in nuke.

By default maya will premult the passes so.... I can't help with AE I stopped usines in ages ago i'd probably just end up confusing the issue. I can test your output image in nuke though if you want

Dave

stwert 15-10-2015 06:53 PM

Sure thanks Dave, sent. For a nuke workflow, should the the passes and/or render layers by premultiplied?

David 15-10-2015 07:10 PM

You can do it either way, I leave mine at default (premultiply) and unpremult any grade or color correction nodes i use then re multiply after

David 15-10-2015 07:11 PM

I'm just grabbing a bite to eat then i'll take a look at your file :) I received it

David 15-10-2015 07:52 PM

ok Nuke was no problem, see the video below I'm not sure what your experience level with nuke is so i kept it basic. Hope it helps, sorry if I lecture a bit after 17 years of tutorials I can't help it anymore ;)

http://www.youtube.com/watch?v=jLjFkh1oHfk

stwert 15-10-2015 08:20 PM

Awesome, you rock! So that's about what I was expecting, and now I'm looking for:
1) Someone with AE experience to tell me whether AE just is bad for compositing or if there is a fix
and
2) Enough hours in the day to learn nuke.


All times are GMT. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018