Announcement

Collapse
No announcement yet.

Cryptomatte by texture

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cryptomatte by texture

    I have a multi sub material with a multisub Tex randomly picking the texture for the first material ID. It's actually more complicated than that in truth.... The multi-sub-tex passes through to an OSL 1ofN nice with the same textures plugged in, so texture can be specified by user data or assigned randomly if that's not present.

    I would like a cryptomatte ID for each texture.

    Can anyone tell me a way to make this work?

    My only solution would be a similar texture plugged in to extra Tex element and then use the cryptomatte for the material ID to matte that and color key the individual texture ID... Seems messy though.

    Suggestions welcome

  • #2
    Maybe this user data can be set as a User Attribute for each shaded object and afterward use the "Node user attribute type" ID type in the VRayCryptomatte? I can try to create such a script, but I need to see where exactly to take the User Data from.

    EDIT: Another thing you can do is use this script I already wrote, which assigns a random value and a User Property of your choice to the selected objects. This way you can match the texture randomness (by using a VRayScalar as the 1 of N index) to the User Attributes automatically.
    Last edited by hermit.crab; 15-11-2022, 06:59 AM.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment

    Working...
    X