Page 1 of 1

Cryptomate, ID Mask, compositing

Posted: Wed Sep 30, 2020 9:16 am
by Dez!
I want to solve the problem with Cryptomate and ID Mask.
I want to get a clear and precise list of actions for getting masks for compositing.
The existing Mask Object and Material IDs cannot be used in work - they have no Anti-Aliasing:
Image

I know that there is a Material ID Color.
Image

They cannot be used in the work either - every rendering changes colors. This closes a lot of possibilities.
For example, rendering on a render farm.
For example, rendering in the program B-Renderon.

The built-in Compositing module in Blender is an extremely powerful tool. It is a pity that we partially lose it using Luxcore.

Or am I wrong?

Re: Cryptomate, ID Mask, compositing

Posted: Wed Sep 30, 2020 9:23 am
by Dade
Dez! wrote: Wed Sep 30, 2020 9:16 am They cannot be used in the work either - every rendering changes colors. This closes a lot of possibilities.
You need to set the LuxCore Object ID by hand otherwise it randomly initialized (to have a false color output).

You can also have anti-aliased by using OBJECT_ID_MASK AOV. There is the OBJECT_ID and the OBJECT_ID_MASK AOVs: the first includes all objects (and can not be antialiased), the second include a single object (the picked object ID and it is anti-aliased).

Re: Cryptomate, ID Mask, compositing

Posted: Wed Sep 30, 2020 9:29 am
by Dez!
Dade wrote: Wed Sep 30, 2020 9:23 am You need to set the LuxCore Object ID by hand otherwise it randomly initialized (to have a false color output).
Yes, it is here:
Image

Where is it?
Dade wrote: Wed Sep 30, 2020 9:23 am You can also have anti-aliased by using OBJECT_ID_MASK AOV.

Re: Cryptomate, ID Mask, compositing

Posted: Wed Sep 30, 2020 10:00 am
by Dez!
Dade wrote: Wed Sep 30, 2020 9:23 am You can also have anti-aliased by using OBJECT_ID_MASK AOV. There is the OBJECT_ID and the OBJECT_ID_MASK AOVs: the first includes all objects (and can not be antialiased), the second include a single object (the picked object ID and it is anti-aliased).
If OBJECT_ID_MASK AOV is this node then I don't know how to use it.
Image

Re: Cryptomate, ID Mask, compositing

Posted: Wed Sep 30, 2020 10:10 am
by B.Y.O.B.
The OBJECT_ID_MASK and MATERIAL_ID_MASK AOVs are not yet supported by the Blender addon.

Re: Cryptomate, ID Mask, compositing

Posted: Wed Sep 30, 2020 10:20 am
by Dez!
B.Y.O.B. wrote: Wed Sep 30, 2020 10:10 am The OBJECT_ID_MASK and MATERIAL_ID_MASK AOVs are not yet supported by the Blender addon.
Is it possible to do it? Will the Blender API make it possible?
I didn't find this question on github.com - can I do it?

And another question - how to work now, when we do not have AOV OBJECT_ID_MASK and MATERIAL_ID_MASK inside Blender?

Re: Cryptomate, ID Mask, compositing

Posted: Wed Sep 30, 2020 10:40 am
by B.Y.O.B.
It doesn't require changes in the Blender API.
There's a github issue about it here: https://github.com/LuxCoreRender/BlendL ... issues/230

Re: Cryptomate, ID Mask, compositing

Posted: Wed Dec 29, 2021 9:10 pm
by MCurto
Sorry to "resurrect" this topic,I'm kind of new to this, guess I'm spoiled for having Cryptomate available in Cycles, I know it's probably not an easy task to implement it but I was under the assumption one could achieve the same purpose with ID masks.

I've tried but can+t seem to grasp it, from what I've tried it seems auto generated IDs don't work, but I'm fine assigning them to materials/objects, but I'm missing how to appropriately set up the nodes to get a good anti-aliasing on masks:
Screenshot 2021-12-29 at 12.30.56.jpg
Screenshot 2021-12-29 at 12.31.14.jpg
The Blender manual also alludes to it, implying one would need to multiply the mask (?):

https://docs.blender.org/manual/en/late ... _mask.html

Also, its a shame the images aren't there anymore but its somehow suggested "Diference key" is the way to fix this:
viewtopic.php?f=5&t=605&start=20

Also:
There is the OBJECT_ID and the OBJECT_ID_MASK AOVs: the first includes all objects (and can not be antialiased), the second include a single object (the picked object ID and it is anti-aliased).
What's the difference between OBJECT_ID and OBJECT_ID_MASK AOVs?

If someone could share the proper way to have a object/material mask properly anti-aliased (assuming its possible) would be most grateful, as it seems there is a lack of sources explaining this.

Ty in advance.

Miguel Curto

Re: Cryptomate, ID Mask, compositing

Posted: Wed Dec 29, 2021 10:10 pm
by Dade
OBJECT_ID_MASK AOV provide a black/white mask (with anti-aliasing) you can use in a composer to replace an object with anything you want :idea:

Re: Cryptomate, ID Mask, compositing

Posted: Thu Dec 30, 2021 7:06 am
by Dez!
How do I get the "OBJECT_ID_MASK AOV"? I don't see it in Blender