# Mat ID doesn't work when VrayLightMtl is in multi sub-object mat

**URL:** <https://forums.chaos.com/t/mat-id-doesnt-work-when-vraylightmtl-is-in-multi-sub-object-mat/107673>\
**Category:** Issues\
**Created:** [November 29, 2021, 7:10pm UTC](https://forums.chaos.com/t/mat-id-doesnt-work-when-vraylightmtl-is-in-multi-sub-object-mat/107673 "2021-11-29T19:10:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timmatron](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/timmatron/32/5404_2.png) [@timmatron](https://forums.chaos.com/u/timmatron)\
**Post date:** [November 29, 2021, 7:10pm UTC](https://forums.chaos.com/t/mat-id-doesnt-work-when-vraylightmtl-is-in-multi-sub-object-mat/107673/1 "2021-11-29T19:10:09Z")

</div>

As the title states, the Mat ID of a vraylight material isn’t working when it’s in a multi sub-object material. So, if you make a multi sub material, and the first material is a regular vray mat, the mat ID will work. However, a vray light material with a different mat ID will not work, it just assumes the same mat ID of the first material.

Using Max 2020 and Vray 5 update 2.

---

<div class="post-metadata">

**Author:** ![hermit.crab](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/hermit.crab/32/46825_2.png) [@hermit.crab](https://forums.chaos.com/u/hermit.crab)\
**Post date:** [November 30, 2021, 5:11pm UTC](https://forums.chaos.com/t/mat-id-doesnt-work-when-vraylightmtl-is-in-multi-sub-object-mat/107673/2 "2021-11-30T17:11:23Z")

</div>

This works for me, but I may have misunderstood the issue. Could you share a screencap of the material setup and result? Or just a simple scene where the issue is present?

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [December 2, 2021, 11:54am UTC](https://forums.chaos.com/t/mat-id-doesnt-work-when-vraylightmtl-is-in-multi-sub-object-mat/107673/3 "2021-12-02T11:54:30Z")

</div>

This seems to work for me too.  
I made a multisub, with the first material a vrayMtl, and the second a lightMtl.  
Applied material IDs 1 and 2 respectively (the render IDs, not the face IDs, although they are identical in my scene).  
Assigned the material, and rendered with a vrayMtlID and a multimatte REs.  
They all seem to get the right data.

As Alex said, could you share more info, or a piece of the non-working setup?

---

<div class="post-metadata">

**Author:** ![timmatron](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/timmatron/32/5404_2.png) [@timmatron](https://forums.chaos.com/u/timmatron)\
**Post date:** [December 2, 2021, 10:32pm UTC](https://forums.chaos.com/t/mat-id-doesnt-work-when-vraylightmtl-is-in-multi-sub-object-mat/107673/4 "2021-12-02T22:32:20Z")

</div>

Hi guys,

Thanks for looking into it. I figured out what the problem was. I had an falloff map in the opacity channel in the vraylight material. It was black color for both, I don’t know why I did that. So normally that would have rendered as totally transparent but since I didn’t have “multiply color by opacity” it was showing up in the rendering. But for MAT ID purposes, it was rendering as if it was totally transparent. I don’t know if that makes any sense, but here’s a quick jpeg of the situation. In any event, I just turned off the unneeded opacity map and I have my Mat ID back. Sorry for the fuss!

 ![vraylight ID with opacity.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/a/c/ac0ce26fc920ebb3cd90606e6ff49bfcdfd78a98.jpeg)

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [December 2, 2021, 10:43pm UTC](https://forums.chaos.com/t/mat-id-doesnt-work-when-vraylightmtl-is-in-multi-sub-object-mat/107673/5 "2021-12-02T22:43:57Z")

</div>

Glad to know you’re sorted out! 🙂
