# VRayMtlWrapper not working for alpha contribution

**URL:** <https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334>\
**Category:** Issues\
**Created:** [November 1, 2018, 8:05pm UTC](https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334 "2018-11-01T20:05:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard\_rosenman](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/richard_rosenman/32/13716_2.png) [@richard\_rosenman](https://forums.chaos.com/u/richard_rosenman)\
**Post date:** [November 1, 2018, 8:05pm UTC](https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334/1 "2018-11-01T20:05:04Z")

</div>

I am using VRay GPU 3.6. To make a matte object, I am assigning it a VRayMtlWrapper and assigning the alpha contribution to -1. But when I render, and check the alpha channel, it’s opaque.

Is there a different way to create matte objects using VRay GPU 3.6?

Thanks,  
-Richard

---

<div class="post-metadata">

**Author:** ![matanov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/matanov/32/21656_2.png) [@matanov](https://forums.chaos.com/u/matanov)\
**Post date:** [November 7, 2018, 2:39pm UTC](https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334/2 "2018-11-07T14:39:50Z")

</div>

Can you describe a little more what do you want to achieve and what’s not working for you?

---

<div class="post-metadata">

**Author:** ![richard\_rosenman](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/richard_rosenman/32/13716_2.png) [@richard\_rosenman](https://forums.chaos.com/u/richard_rosenman)\
**Post date:** [November 7, 2018, 7:35pm UTC](https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334/3 "2018-11-07T19:35:09Z")

</div>

> [@matanov](#):
>
> Can you describe a little more what do you want to achieve and what’s not working for you?

Hi Peter;

If you want to render an object that is matted out by another, in VRay Advanced you would go to Object Settings under the System rollout, select the object, and assign it a matte Object with -1 alpha contribution. You could also do with with the VRayMtlWrapper. Then when you render that object, it renders black in its RGB and alpha channel.

With VRay GPU, there are no Object Settings in the System Rollout so the only option is to use the VRayMtlWrapper. However, VRay GPU does not respect it. Despite ticking off the Matte Object button and setting the alpha contribution to -1 in the shader, the alpha channel will still render white.

Rendering matte objects is critical for any production requiring layers so there must be something I’m overlooking as I’m sure there’s now way VRay GPU would not have this capability.

-Richard

---

<div class="post-metadata">

**Author:** ![matanov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/matanov/32/21656_2.png) [@matanov](https://forums.chaos.com/u/matanov)\
**Post date:** [November 8, 2018, 2:50pm UTC](https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334/4 "2018-11-08T14:50:11Z")

</div>

But it will render white in the alpha only where you have a shadow on the matte?

---

<div class="post-metadata">

**Author:** ![richard\_rosenman](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/richard_rosenman/32/13716_2.png) [@richard\_rosenman](https://forums.chaos.com/u/richard_rosenman)\
**Post date:** [November 8, 2018, 9:47pm UTC](https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334/5 "2018-11-08T21:47:27Z")

</div>

> [@matanov](#):
>
> But it will render white in the alpha only where you have a shadow on the matte?

Hi Peter;

It is strange - as I put together a render example for you, I noticed VRay GPU is in fact matting properly with the VRayMtlWrapper so it must be a scene-specific issue. I was using much simpler models for your example than in my project which involves a massive city model so perhaps the model complexity has something to do with it.

I am in the process of wrapping up the project but if I have time, I will try to look into it further.

Regards,  
-Richard

---

<div class="post-metadata">

**Author:** ![matanov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/matanov/32/21656_2.png) [@matanov](https://forums.chaos.com/u/matanov)\
**Post date:** [November 9, 2018, 10:31am UTC](https://forums.chaos.com/t/vraymtlwrapper-not-working-for-alpha-contribution/91334/6 "2018-11-09T10:31:34Z")

</div>

There were some problems with setups that include Dome lights, but they were fixed. You can check if that is your issue.
