White border on alpha masked materials

Hi, I got a strange behaviour when using transparency in VRay:

I use a png for the diffuse color and checked the option “diffuse texture alpha” to get the alpha values from the png. It works, but when I render this material in front of a darker material, there always is a white border. How can I avoid this?

I tried also a png without transparency plus additional black/white transparency map - same issue.

Maybe the transparent area is to small and the soft anti aliasing cause that the background color from the PNG is visible. Do you get a white seam if you use the transparency map, but you use a green color instead the texture at the diffuse slot?

I think when you create your image with an alpha channel you get a choice of Prematted or Straight.
This is what causes your white edges.

More info here

Are you sure the info is valid for PNG? I never have seen an option for prematted or straight. Is there an option for example in Photoshop?

A Generic material with the transparency map shows the same white border:

I found a way to avoid this issue:

Create a Generic material (1) with the png as diffuse color
Create a Generic material (2) and change the opacity to “0”, so the material is invisible
Create a Blend material: use the invisible material (2) as base material and material (1) as coat. Use the transparency map as blend map.

That is the result:

Does anyone understand, why there is a white border when using a map on opacity, but no such border, when I use the identical map as a blend map?

How doe’s it look if you use no PNG at the diffuse slot, only a red color?

I did a check. Solid color is no problem:

Looks like the background color of the transparent area is visible at the edges:

I see two ways to fix it - create a transparecny map where the transparent area is larger or add an other background color at the diffuse texture. I would try to make it green.

Thanks for your effort Micha!
I tried it with a solid color (no png involved), it is the red one above → white border. And the transparent area is quite big, making it bigger should not have any effect.

For now, my solution seems to be the blend material, even if I don´t understand what is going on exactly.

Strange. So we have two different results. Could you post an example file?

@Nikolay can you have a look at this please?

Here it is. Sorry for the delay!

Transparency_example.3dm (2.6 MB)

Hey guys . can you try this solution?

Let me know :wink:


Changing the mode of the opacity map from stochastic to clip fixed it. Thanks!

1 Like