Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: davetwo on 2023-08-11, 10:15:33

Title: Material ID - am I being stupid?
Post by: davetwo on 2023-08-11, 10:15:33
Hola - I constantly use Object IDs to get nice masks for post work. But occasionally Id rather use Material IDs instead for logos etc - but I can't seem to gt them to work?

I assign a material ID number in the advanced field of the material. Then make a multipass mask and assign the material id number there too. But the mask just come out black. It also doesnt appear if I make an ID pass and set it to material.

Is this a limitation of stacked materials/materials with alphas? Or am I doing something wrong.

Theres an example of what I'm trying to achieve attached. Orange base material with the alpha masked logo stacked on top.
Title: Re: Material ID - am I being stupid?
Post by: HFPatzi on 2023-08-11, 14:17:21
Hey Dave,

as far as i know, this is not possible. I have this problem too (Brushed metal logoplate with alphamasked logo stacked on top).
So, to answer your quastion in the thread title: I don't think you're stupid. And if you are, i am too ;)

Maybe meanwhile there's a solution for this. But if so, didn't hear of it so far. Did you try to use the corona decal object, maybe it works there?

Greetings,
Moritz
Title: Re: Material ID - am I being stupid?
Post by: davetwo on 2023-08-11, 15:29:46
Ah, good to hear I'm not stupid; bad to hear its not possible :)

I nomally make a second render of labels  by pasting a simple black and white material into the luminosity slot and turning the lights off - it's an extra step which I'd rather not take, but it's better han nothing.
Title: Re: Material ID - am I being stupid?
Post by: tuami on 2023-08-14, 10:45:01
you can use corona decal and mask -> ID -> Instance or Material, the other one did not work for me either
Title: Re: Material ID - am I being stupid?
Post by: Ealexander on 2023-08-17, 21:21:06
Here's how I do it -

Turn on Corona Mutipass from the Corona menu and add an ID pass.  Click on the ID pass and change it's ID type to Material.  Render to Picture viewer and when done rendering, in the Picture viewer window, switch to LAYER and check Single pass and save this out.  In my example you can see different colors for each material - the cone and Cube.1 have the same material.
Title: Re: Material ID - am I being stupid?
Post by: davetwo on 2023-08-17, 22:55:45
Thanks Evan - but I dont think this works for stacked or alpha'd materials.

Seems like decals are the way to go. I just worry about them being less 'sticky' than the regular way. More prone to be accidetally nudged etc.
Title: Re: Material ID - am I being stupid?
Post by: Ealexander on 2023-08-18, 16:47:36
Whoops - sorry, read your post too fast.
Title: Re: Material ID - am I being stupid?
Post by: HFPatzi on 2023-08-21, 21:56:22
Thanks Evan - but I dont think this works for stacked or alpha'd materials.

Seems like decals are the way to go. I just worry about them being less 'sticky' than the regular way. More prone to be accidetally nudged etc.

Maybe you could put it as a child of the decaled object and to be absolute sure, put a protection tag on it?