Layering Materials Causes Nasty Matte Lines

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.



bitmapalpha.zip (656 KB)

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

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

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)

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.

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

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

- Neil
bitmapalpha03.zip (31.7 KB)

lol here we go.

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.

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)

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

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

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

Nope, doesn’t work on this example.

- Neil

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

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.

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.



Nice one dragon master hahaha!