Rendering out render-element mattes of objects or materials possible?

hi,

in 3dsmax i can render out coloured object-id ,material-id, or render-ids as render-elements.

GeometryElementsHero_00000x

…also for vray renderer i have the possibility to define 3 objects or 3 materials for one RED/GREEN/BLUE matte render element (and there are multiple render elements of this “multimatte” possible…). so these 3 elements of the one rendering are quite easy to select in compositing.

…what posibilities as render-elements do i have in blender to define easy selectable mattes of objects, collections, or materials?

i checked out “object index” and “material index”, but there i only get a black-white mask. also i know about cryptomatte.

big thanks for help!

thomes

You can eg render the random colors that are available in workspace (renderengine).

1 Like

Actually, those passes aren’t only black and white, they are stored in float precision. So an object index of 10 is just 10 times as bright as #FFFFFF white. When rendered in a float format like EXR, you can access all values correctly.

Furthermore, check out the AOV output node, which is Blender’s version of the VRayExtraTex element. It’s added to your materials, and you can feed any color input into it, per material, which makes this superior to ExtraTex, in my opinion. For example, I’m doing a lot of packaging shots, and I usually feed the raw color texture into an AOV node, to get the full Albedo of the print data as a render element. With multiple packages, this would have required either multiple ExtraTex elements in Max, or more some MultiSubTex-shenanigans to makes this work. AOV makes this a lot easier.

But you can also just set them to flat colors, and when set to full R, G or B, it mimics MultiMatte set to material ID mode.

And as you’ve mentioned, you could give Cryptomatte a shot. I haven’t used it too much myself yet, but when set up properly, it renders out object and material masks for everything (WITH anti-aliasing!), without the need to set MatIDs or ObjectIDs by hand.

1 Like

thanks. aov is cool, here a good and fast explanation

i think this is what debuk mentioned…

By the way, it’s not necessary to connect anything to the AOV node (for some reason he plugs a gradient in there). You can just set the color in the node itself, and it will work as well.

thats how i did it , but thanks … :stuck_out_tongue_winking_eye:

1 Like

Cryptomatte is indeed a much modern way to handle ID passes, doing it the old school way with a “Clown pass” / colored IDs might be only useful for convenience when post processing in an application that doesn’t handle Cryptomatte passes, or when you don’t want to export multichannel EXR for a few mattes, or maybe because you have a very specific need like a few different objects and materials you want to group together and making an AOV for that might be simpler then…

hi,

so finally , i´m not really happy with the antialias at the AOI edges…it is quite bad if there is nothing around as it seems.

can i do something?

thanks for help!

tomes

PS if i give all the others a black AOV it gets good.so maybe this the only solution…but could get a bit of work in big files… :flushed: …there should be a solution to solve this by tick

interesting, did you try to enable transparency in film, IIRC AOV was transparent where no material have them, maybe this is why it look like that on the first image because of no alpha…

I agree it’s close to be called a bug…

If nothing works, maybe give Criptomatte a go, and if that’s still an issue I can give a closer look !

Good hunt !

2 Likes

hi,

it comes from saving .tga in RGBA … with RGB its ok.

as it seems it has nothing to do with film transparency…

aov.blend (164.3 KB)

thanks for your feedback

thomes

Hum, thanks for providing the test file, it looks fine on my side :

… for me too here running 3.6.0 :joy:

check it tomorrow at work…running 3.6.1 i think…or maybe a newer build…i´m pretty sure that it did not work.

1 Like

hahaha I’m on 3.6.3 (Release candidate) , by judging the renders you posted earlier something was definitely wrong, and that’s great that it’s been fixed !

so, i did some more tests also on 3.6.0.

it seems that it only seems that it works. if you look it in a viewer that shows everything without alpha and channels, it looks good, but if you check the channels they are bad!

here in the viewer, looks good :

here the look in photoshop, bad…:

here the alpha in Photoshop, looks also good !:

here the bad AOV channel “red”:

and here the red channel if you render out RGB instead of RGBA, now it is good!

here both AOV renders to check them :
AOV-RGBA.tga (4.8 MB)
AOV-RGB.tga (3.8 MB)

Hum, you probably just need to put the alpha layer on top of the color in multiply blending mode.
This will just pre-multiply the image, since that color layer looks just like straight alpha to me.

Why it’s not converted right away is a mystery, you might try .png that might handle alpha differently in a more predictable way.

1 Like

yes, possible, looks nearly right…about 1 pixel smaller, but good.

…you can see it scaled up in PS…