3
$\begingroup$

Seems like a z-buffer issue.

Everything seems fine in the material preview, but in the render the sky (or transparency, if no sky) "bleeds" a pixel or two between the intersecting part (intersecting in the 2d render, not 3d) transparent textured geometry and any geometry behind it. Hope this makes some sense:

enter image description here

Material/texture settings are as follows: enter image description here

enter image description here

Changing transparency mode of the Texture from Straight to Premultiplied doesn't fix it.

blend can be found here: https://drive.google.com/open?id=0B8pm58kHwzU3M3hUZmdFdUhTdDg

The texture file separately can be found here: http://i.imgur.com/bRBRdX8.png Tried a different texture file from cgtextures with no difference.

$\endgroup$
  • 2
    $\begingroup$ is this the same question as blender.stackexchange.com/questions/43015/… ? $\endgroup$ – user1853 Dec 28 '15 at 15:52
  • $\begingroup$ It is accessible. drive.google.com/file/d/0B8pm58kHwzU3M3hUZmdFdUhTdDg/… If something is wrong, google is to blame. I tried Pasteall.org first but it would never finish uploading. THey never implemented a status bar so I don't know if it's extremely slow or just bugged out. PS. sorry for double post, so much has happened I had forgot I had asked this before. in any case, now I have the blend and texture file uploaded. $\endgroup$ – Leo Ervin Dec 28 '15 at 16:15
  • $\begingroup$ A random guess without looking, toggle Pre-multiplied Alpha on the texture/material. I had some contrasting outline problems fixed that way. $\endgroup$ – HalfKiloByte Dec 29 '15 at 8:46
  • $\begingroup$ tried that....... $\endgroup$ – Leo Ervin Dec 29 '15 at 10:36
0
$\begingroup$

Toggle transparency in the branches material

Branch material

It seems that there is some issue in the render pipeline, due to the anti-aliasing of the smaller parts.

If you compare the render pass of solid color with the z-transparent one, you'll notice that the alpha channels do not match perfectly.

render pass solid

render pass z-transparence

differences

EDIT

Actually is not a bug, but a limit of the approximation instead.

As @Jerryno and @HalfKiloByte suggest, if you used more accurate algorithms and less approximation, you would avoid subpixel issues in the smaller parts.

I've increased the render resolution (10 times) to better evaluate the steps and the final result.

You'll notice the two passes (solid and transparent) here:

Rendering in progress

In the final render there are no pixels around the branches:

Rendering in progress 2

$\endgroup$
  • $\begingroup$ So you think it's a bug? I get that antialiasing has something to do with it, but even if it was turned off, if Blender properly used the depth buffer for Z-Transparency, wouldn't what really is behind the pixel be drawn, not something which is behind everyting else in the scene and probably also in the depth buffer? $\endgroup$ – Leo Ervin Dec 31 '15 at 10:48
  • $\begingroup$ @LeoErvin I've edited the answer to better explain the process. Hope this helps $\endgroup$ – parameciostudio Dec 31 '15 at 13:27
2
$\begingroup$

The main problem is anti-aliasing the alpha borders of the leaves. You should enable Full Sample in the Render options for best quality. This will render correctly:

enter image description here

Other problem for best quality might be the transparent texture itself. There is no color bleed over the transparent edge. There is black background over the transparent pixels. On the leafs texture sampling and filtering happens. And the transparent border get's blurred and the black leaks into the leafs. The image without alpha channel should look like the right one:

enter image description here

Make sure when you are exporting the whole rgb channels are exported and not clipped with the alpha channel.

$\endgroup$
0
$\begingroup$

Hope this Helps, better then words an image! Hope this Helps, better then words an image! And what's more there is a blend file HERE for your reference good luck cheers! Be sure to click on download through your browers so you don't have to install the mega site's software.

PS : Do study the image of the leaf I have included it's been processed with photoshop so that the edges of the leaf's color are also copied to make buffers for error.

$\endgroup$
  • $\begingroup$ Could you please explain what the Stencil option does here? It's usually used as a mask for two texture images. Thanks in advance. $\endgroup$ – Leo Ervin Dec 30 '15 at 11:37
  • $\begingroup$ Ok found the explaination on blender manual here is the link ...blender.org/manual/render/blender_render/textures/influence/… $\endgroup$ – hawkenfox Dec 30 '15 at 11:50
  • $\begingroup$ @LeoErvin the option is to tell the image is a mask for the next image in the texture stack, and it does not fix the issue. It makes it even worse.. $\endgroup$ – Jaroslav Jerryno Novotny Dec 30 '15 at 11:51
  • $\begingroup$ Yeah, that's not a solution Sorry, hawkenfox. $\endgroup$ – Leo Ervin Dec 30 '15 at 11:58
  • $\begingroup$ I use GIMP. But why should I worry about extending the edge colors if I use alpha channel in multiply mode? My understanding of the issue is if that was to blame, my texture image would need to have "feathered edges" for that to be the case, or semitransparent pixels on the edges of the leaves, to explain it in another way. But they don't. If there's more to the "background color" of images with alpha channel and how it affects 3d renders, please include that in an answer. $\endgroup$ – Leo Ervin Dec 30 '15 at 12:00
0
+50
$\begingroup$

This is a strange phantom issue that I will never learn how to solve. It totally depends on what you want to do with the image. There is the case when the branch outlines go away, but a bright outline will appear when you switch from Sky color to Transparent background.

I usually play with these and get different results:

  • Render Options > Shading > Alpha: Sky or Transparent
  • Render Options > Anti-Aliasing (Oversampling): On or Off
  • Material > Transparency mode: Z-transparency or Raytrace
  • Texture > Alpha mode: Straight or Premultiplied

Your case is easily solved by setting the material transparency to "Raytrace".

enter image description here

This image was made with:

  • Render Options > Shading > Alpha: Sky
  • Render Options > Anti-Aliasing (Oversampling): On
  • Material > Transparency mode: Raytrace
  • Texture > Alpha mode: Straight

But you don't want to set it to transparent background without playing with the other settings.

$\endgroup$
  • $\begingroup$ Z-transparency uses the depth buffer as far as I know, I don't see why it would be necessary to use Raytracing transparency which can substantially increase render time just to not have this issue. This is a workaround and not for every situation sadly. But thanks for posting. $\endgroup$ – Leo Ervin Dec 31 '15 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.