[Bf-committers] Is alpha within Blender totally broken?

Troy Sobotka troy.sobotka at gmail.com
Sat Jul 16 23:37:57 CEST 2011


So far, I've been experimenting with several files and uptake tools
using Blender in conjunction with Nuke. I have yet to be able to find
a pattern that delivers proper alpha channels.Perhaps someone here can
shed some light on the matter.

It has been noted before that there has been some mishandling of alpha
with regards to all of the non linear output formats such as TIFF,
PNG, etc. However, upon testing quite extensively with EXR, I am still
struggling to see a proper use case currently.

I have experimented with the following four combinations:

CM ON - Straight Alpha
CM OFF - Straight Alpha
CM ON - Premul Alpha
CM OFF - Straight Alpha

In all of the instances, there is significant darkening or lightening
near the edges, suggesting something is wrong. When ingested into
Nuke, the results are equally confusing.

I hope that someone can shed some light on the issue, as it is
worrying. The same impacts can be noted when we use blurs, only they
are augmented by a greater region of disparity where the alpha blurs
occur.

The following images are direct output from Nuke with proper premul
settings where appropriate. The same issues appear in other image
editors and different file formats. In this instance, the tests were
conducted with EXR output files saved with RGBA.

CM ON - Straight - http://img228.imageshack.us/img228/1639/cmonstraight.jpg
CM OFF - Straight - http://img43.imageshack.us/img43/3961/cmoffstraight.jpg
CM ON - Premul - http://img687.imageshack.us/img687/8082/cmonpremul.jpg
CM OFF - Premul - http://img194.imageshack.us/img194/6276/cmoffpremul.jpg

The concern I have is that I believe Blender is mishandling alpha
channels in all instances. This is partially obscured by the fact that
whatever technique is being used to encode it is also being used to
decode it. In some instances, the alpha channel effects are also
difficult to notice, as it is subject to the size of the alpha region
and the nature of the background.

In the above tests we can clearly see the darkening over the magenta
region near the antialiased alpha edges. This can be far more greatly
seen when we execute a blur.

I have done some testing with gamma adjustments on the alphas to try
and rectify the situation, believing that it may be because of a log
to lin or vice versa error, to no avail. Premul also doesn't seem to
impact the results and solve the problems.

Here is to hoping someone can lend some thought to the issues at hand.

With respect,
TJS


More information about the Bf-committers mailing list