Simple material id script for masking?

Is there a script like Oso Toon Shader but simpler?

- Set all elements in scene to one same material id

- Set selected element in scene and in its tree elements to one specific (or random) material id

 

The intention is to e.g. get a mask in a complex scene for one figur with its components like hair and outfit.

With Oso Toon Shader  I get different colors for the figure’s components like hair and outfit.

But perhaps I do something wrong or miss something.

Comments

  • SevrinSevrin Posts: 6,310

    I don't use the Material ID canvas for masking as it's usually too jaggedy to be of much use, especially for hair.  You get a very accurate mask when using the Alpha setting.

    1. Select all the objects you want to mask in the Scene tab.  For best results, right-click the figure and Select>Select Children, to make sure you get all jewelry, accessories, etc.
    2. Create a Beauty canvas, check the Alpha box and then in Nodes, you Create from Selection.  You will then get the selection with a black background, and an alpha layer you can use as a mask.
    3. You can, of course, also create separate masks for character, outfit, jewelry and hair, which is what I often do, but that's not always necessary.

     You'll also want to create a canvas with nothing selected, of course.

  • chromchrom Posts: 260

    Thank you very much.

    Yes, you are right regarding hair. I guess also with transparent material.

    It works and also well with intersections of non-selected objects.

Sign In or Register to comment.