# Layering Materials Causes Nasty Matte Lines

**URL:** <https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237>\
**Category:** General\
**Created:** [September 6, 2013, 3:04am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237 "2013-09-06T03:04:08Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![soulburn3d](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/soulburn3d/32/46297_2.png) [@soulburn3d](https://forums.chaos.com/u/soulburn3d)\
**Post date:** [September 6, 2013, 3:04am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/1 "2013-09-06T03:04:08Z")

</div>

I’ve had these problems before in the standard scanline renderer, but I was wondering if vray had anything available to solve the issue.

Check the attachments below. I have a vrayBlendMaterial, the base material is just a grey diffuse, and the Coat material is referencing a bitmap for its color (the color channel of the bitmap) and opacity (the alpha of the bitmap). The bitmap is saved as a transparent tif through photoshop. The rendered result has nasty dark rings around it, ie, it’s not compositing properly. Un-pre-multiplying the texture helps a bit but not much. Using the alpha as a mask in the vrayBlendMaterial instead of an opacity has the same results.

Does anyone know what can be done to solve this? Some sort of extra operation on the bitmap? A different bitmap format?

Any advice will be uber appreciated.

- Neil

PS: I’ve included the max file (2014) if anyone wants to play with it.

 ![bitmapalpha1.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/d/7/d71dcc177da8df5212e4c0ab516adee7faa20e0a.jpeg)  
 ![bitmapalpha2.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/9/a/9ad534774669ecd697a4b0f0db068fc8be8ac11c.jpeg)  
[bitmapalpha.zip](https://forums.chaos.com/uploads/short-url/s11aMrLb0dCWEujZTyADlwiRt6U.zip) (656 KB)

---

<div class="post-metadata">

**Author:** ![grantwarwick](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@grantwarwick](https://forums.chaos.com/u/grantwarwick)\
**Post date:** [September 6, 2013, 4:09am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/2 "2013-09-06T04:09:28Z")

</div>

Take the opacity map off of the material itself and plug it into the blend slot on Coat 1.

That might fix it.

---

<div class="post-metadata">

**Author:** ![soulburn3d](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/soulburn3d/32/46297_2.png) [@soulburn3d](https://forums.chaos.com/u/soulburn3d)\
**Post date:** [September 6, 2013, 4:30am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/3 "2013-09-06T04:30:25Z")

</div>

> [@On another topic](https://forums.chaos.com/t/41974/10):
>
> Take the opacity map off of the material itself and plug it into the blend slot on Coat 1.  
> That might fix it.

Nope, as I mentioned, using the alpha as a mask in the vrayblend material instead of in the opacity causes the same problem (I should have referred to the “mask” as the “blend mask”, my apologies for not being clear).

- Neil

---

<div class="post-metadata">

**Author:** ![grantwarwick](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@grantwarwick](https://forums.chaos.com/u/grantwarwick)\
**Post date:** [September 6, 2013, 4:41am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/4 "2013-09-06T04:41:27Z")

</div>

My bad, I didn’t read that actually! Too confident!

What if you turn the blur value on the map to .01 I’ll have a play anyway

---

<div class="post-metadata">

**Author:** ![grantwarwick](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@grantwarwick](https://forums.chaos.com/u/grantwarwick)\
**Post date:** [September 6, 2013, 4:48am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/5 "2013-09-06T04:48:48Z")

</div>

Solved it.,

Make the top coats diffuse color the same mid grey.  
Because of the alpha map, 3dsmax samples the diffuse color in the actual color slot (which was black)

 ![](https://europe1.discourse-cdn.com/chaosprd/original/4X/f/e/6/fe6b51ce84662aa47c8bf58870b4e42a51b3f2f3.jpeg)

---

<div class="post-metadata">

**Author:** ![grantwarwick](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@grantwarwick](https://forums.chaos.com/u/grantwarwick)\
**Post date:** [September 6, 2013, 4:52am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/6 "2013-09-06T04:52:51Z")

</div>

BTW, massive thanks for all your support to the community!

You’ve been one of the biggest contributors to the scene I’ve seen over the last 10 years.

---

<div class="post-metadata">

**Author:** ![soulburn3d](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/soulburn3d/32/46297_2.png) [@soulburn3d](https://forums.chaos.com/u/soulburn3d)\
**Post date:** [September 6, 2013, 5:13am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/7 "2013-09-06T05:13:44Z")

</div>

> [@Z-Depth Problem](https://forums.chaos.com/t/z-depth-problem/42063/3):
>
> Solved it., Make the top coats diffuse color the same mid grey.  
> Because of the alpha map, 3dsmax samples the diffuse color in the actual color slot (which was black)

Well, that solves this simple test case, but the real material I’m using contains bitmaps in 5 different base layers/topcoats, not a simple grey color, so afraid that technique is a no go.

But thanks for giving it a try! And thanks for the compliment, glad you’ve enjoyed my work.

- Neil

---

<div class="post-metadata">

**Author:** ![soulburn3d](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/soulburn3d/32/46297_2.png) [@soulburn3d](https://forums.chaos.com/u/soulburn3d)\
**Post date:** [September 6, 2013, 5:34am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/8 "2013-09-06T05:34:19Z")

</div>

Here’s a new puzzle file, this time with a more complex base material…

- Neil  
[bitmapalpha03.zip](https://forums.chaos.com/uploads/short-url/nmACHYAi6izAaGx5z3FBWH76mQ7.zip) (31.7 KB)

 ![bitmapalpha3.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/6/9/690ba2b12305d8db4370d4ca15bf3a4463af5d99.jpeg)

---

<div class="post-metadata">

**Author:** ![grantwarwick](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@grantwarwick](https://forums.chaos.com/u/grantwarwick)\
**Post date:** [September 6, 2013, 5:37am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/9 "2013-09-06T05:37:09Z")

</div>

lol here we go.

---

<div class="post-metadata">

**Author:** ![DPS](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/dps/32/38376_2.png) [@DPS](https://forums.chaos.com/u/DPS)\
**Post date:** [September 6, 2013, 8:37am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/10 "2013-09-06T08:37:37Z")

</div>

I had a hard time getting this to work - you could run it through a composite node but obviously you lose the modular approach. Or paint wider than your Alpha but that’s a pretty gash solution.

I’d be interested to hear if there’s a better way.

---

<div class="post-metadata">

**Author:** ![Yves\_Adam](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/yves_adam/32/10439_2.png) [@Yves\_Adam](https://forums.chaos.com/u/Yves_Adam)\
**Post date:** [September 6, 2013, 10:26am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/11 "2013-09-06T10:26:01Z")

</div>

saving tes2.tif as a png seems to fix your issues ? (as most apparent by the yellowish spots)  
I assume it’s an issue with the Tiff file format.  
(the only application I know of which handles this right is After FX where you can say what background the input image is premultiplied against.  
saving the transparant image as a png seems to come in right in max as having no background  
(though the way max displays the images (view image) looks rather weird)

 ![test.jpg](https://europe1.discourse-cdn.com/chaosprd/original/2X/c/c0accdfc1366fc800d31acaa53f1b976be3c7a8f.jpeg)

---

<div class="post-metadata">

**Author:** ![AJ\_Jefferies](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/aj_jefferies/32/50682_2.png) [@AJ\_Jefferies](https://forums.chaos.com/u/AJ_Jefferies)\
**Post date:** [September 6, 2013, 11:13am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/12 "2013-09-06T11:13:53Z")

</div>

Yves is right, Max seems to always multiply transparent TIFFs against black. We don’t have 2014 installed here yet but if you do view image on the Tiff inside Max it will probably show it with a black BG.

---

<div class="post-metadata">

**Author:** ![Yves\_Adam](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/yves_adam/32/10439_2.png) [@Yves\_Adam](https://forums.chaos.com/u/Yves_Adam)\
**Post date:** [September 6, 2013, 11:37am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/13 "2013-09-06T11:37:12Z")

</div>

> [@Ghost3d](#):
>
> Yves is right, Max seems to always multiply transparent TIFFs against black. We don’t have 2014 installed here yet but if you do view image on the Tiff inside Max it will probably show it with a black BG.

It does … seeing as I am using 2014 and the background is black.  
The png background does look weird though

 ![view png.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/1/c/1c6cd5c9f305495ba5f00ee866abb635a4734287.jpeg)

---

<div class="post-metadata">

**Author:** ![soulburn3d](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/soulburn3d/32/46297_2.png) [@soulburn3d](https://forums.chaos.com/u/soulburn3d)\
**Post date:** [September 6, 2013, 3:23pm UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/14 "2013-09-06T15:23:31Z")

</div>

Awesome, thanks you guys! Last time I tried this (like 7 years ago), tif was the format that worked the best for me. But png works great now (I’m pretty sure I tried png last time and it didn’t work, but who knows).

Problem solved.

- Neil

---

<div class="post-metadata">

**Author:** ![Deflaminis](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/deflaminis/32/22216_2.png) [@Deflaminis](https://forums.chaos.com/u/Deflaminis)\
**Post date:** [September 7, 2013, 6:09am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/15 "2013-09-07T06:09:22Z")

</div>

Usually all you have to do is turn off filtering on the alpha map.

---

<div class="post-metadata">

**Author:** ![soulburn3d](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/soulburn3d/32/46297_2.png) [@soulburn3d](https://forums.chaos.com/u/soulburn3d)\
**Post date:** [September 7, 2013, 6:28pm UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/16 "2013-09-07T18:28:10Z")

</div>

Nope, doesn’t work on this example.

- Neil

---

<div class="post-metadata">

**Author:** ![AbeMata](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/abemata/32/71045_2.png) [@AbeMata](https://forums.chaos.com/u/AbeMata)\
**Post date:** [September 11, 2013, 5:39pm UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/17 "2013-09-11T17:39:11Z")

</div>

I had this exact issue on my last job. I can tell you exactly nothing because I couldn’t solve it 🙂

Essentially the alpha/mask is not multiplying against the coat shader? I’ll do a test later today, as I probably  
will be using blends with coat masks in the future.

---

<div class="post-metadata">

**Author:** ![svetlozar.draganov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/svetlozar.draganov/32/53004_2.png) [@svetlozar.draganov](https://forums.chaos.com/u/svetlozar.draganov)\
**Post date:** [September 16, 2013, 2:39pm UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/18 "2013-09-16T14:39:27Z")

</div>

In Gimp there is a option for saving color-values for transparent pixels. With that option on the blending is perfect  
Don’t know which software are you using for your tiff files - but try to find out something similar.

 ![gUV2DdD.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/8/4/84a26042742e06bc30246cbf5949cb70e0038f63.png)  
 ![sb3JgHA.jpg](https://europe1.discourse-cdn.com/chaosprd/original/2X/b/b26c255ebf7a831fa742f40a06bbc1869c28d86e.jpeg)  
 ![ZzeIzK5.jpg](https://europe1.discourse-cdn.com/chaosprd/original/2X/9/912158bd39ad2e5c98c0679828472ff219e8c675.jpeg)

---

<div class="post-metadata">

**Author:** ![grantwarwick](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@grantwarwick](https://forums.chaos.com/u/grantwarwick)\
**Post date:** [September 20, 2013, 7:30am UTC](https://forums.chaos.com/t/layering-materials-causes-nasty-matte-lines/46237/19 "2013-09-20T07:30:06Z")

</div>

Nice one dragon master hahaha!
