AOVs do not work with Alpha Opacity - Bug or a "feature"?

Hi,

I just found out that AOVs in Blender do not take opacity mapping into an account, ruining any AOVs meant to be used with opacity mapped materials. Here’s an example of me trying to perform a trivial task of texture baking a tree twig:


A simple shader with AOV outputs:

Combined layer looks fine:

But the AOVs are wrecked:

I am not sure whether to report this as a bug or if it has any reason…?

1 Like

Maybe I’m completely missing the point, and I don’t have much experience with AOV, but:
Can’t you take the alpha output socket from the color texture and add it as alpha to your albedo AOV? You don’t connect anything to the alpha, so I guess it’s to be expected that it’s not used?

edit: or the opacity map you have? you don’t use that opacity in your AOV ?

AOV has no opacity. It has only color or float input, and then in the Layer Properties panel, you decide which one of the two you want to use:
image
That “Value” input on the AOV node is not alpha.

Adding support for alpha / filtering options is on the list here:
https://developer.blender.org/T73266

2 Likes

Hmm, this is a bit confusing. Should it really be an option?

I mean Alpha in the context of Principled BSDF shader is basically the amount of physical presence of the material in the scene world, which can be specified on sub-triangle basis, by the texture. I am having a hard time imagining use case where someone would want to have some AOV data present in the areas where the object is masked out (and therefore reveals some objects behind the masked areas). Such AOV would then end up unusable as it would be also modifying parts of the other objects which are revealed by the non-1 alpha masked areas.

If it’s going to be changed, I don’t think it should be an option.

It’s also a bit concerning that task is now over 2 years old, and Cycles still can’t do something as trivial as baking a texture of a tree twig :confused:

As a temporary solution, what we do is to generate another custom AOV and we input the alpha value to the color, that way you get the actual color AOV and the alpha to use it in compositing, just in case this helps.

How would that solve this particular issue where the areas, which are supposed to be masked out overlap the areas which are supposed to be opaque, in oddly semi-transparent manner?


Even if I used alpha to cut out this resulting texture, I would still get random ugly pieces of those semi transparent areas on the opaque ones…? :confused:

1 Like

You are totally right, that cannot be solved.