Cryptomate, ID Mask, compositing

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
User avatar
Dez!
Posts: 368
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Cryptomate, ID Mask, compositing

Post 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?
Linux Plasma | Ryzen 5, 32Gb, SSD M2, GT 590 RX | BenQ 27 | Wacom One | Microsoft Ergo | Tie Guan Yin tea
http://dezigner.tilda.ws/
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Cryptomate, ID Mask, compositing

Post 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).
Support LuxCoreRender project with salts and bounties
User avatar
Dez!
Posts: 368
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Re: Cryptomate, ID Mask, compositing

Post 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.
Linux Plasma | Ryzen 5, 32Gb, SSD M2, GT 590 RX | BenQ 27 | Wacom One | Microsoft Ergo | Tie Guan Yin tea
http://dezigner.tilda.ws/
User avatar
Dez!
Posts: 368
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Re: Cryptomate, ID Mask, compositing

Post 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
Linux Plasma | Ryzen 5, 32Gb, SSD M2, GT 590 RX | BenQ 27 | Wacom One | Microsoft Ergo | Tie Guan Yin tea
http://dezigner.tilda.ws/
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Cryptomate, ID Mask, compositing

Post by B.Y.O.B. »

The OBJECT_ID_MASK and MATERIAL_ID_MASK AOVs are not yet supported by the Blender addon.
User avatar
Dez!
Posts: 368
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Re: Cryptomate, ID Mask, compositing

Post 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?
Linux Plasma | Ryzen 5, 32Gb, SSD M2, GT 590 RX | BenQ 27 | Wacom One | Microsoft Ergo | Tie Guan Yin tea
http://dezigner.tilda.ws/
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Cryptomate, ID Mask, compositing

Post 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
MCurto
Posts: 56
Joined: Sun May 09, 2021 5:28 pm

Re: Cryptomate, ID Mask, compositing

Post 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
Last edited by MCurto on Thu Dec 30, 2021 12:52 am, edited 1 time in total.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Cryptomate, ID Mask, compositing

Post 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:
Support LuxCoreRender project with salts and bounties
User avatar
Dez!
Posts: 368
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Re: Cryptomate, ID Mask, compositing

Post by Dez! »

How do I get the "OBJECT_ID_MASK AOV"? I don't see it in Blender
Linux Plasma | Ryzen 5, 32Gb, SSD M2, GT 590 RX | BenQ 27 | Wacom One | Microsoft Ergo | Tie Guan Yin tea
http://dezigner.tilda.ws/
Post Reply