[Bf-cycles] Alpha pass independent from transparent option
Brecht Van Lommel
brechtvanlommel at pandora.be
Sat Dec 8 20:47:21 CET 2012
> So I would make the following suggestion to avoid the ambiguity:
> 1- do as you said and switch key/premul based on output format (with a a
> choice if the format allows both) in the output file settings.
Yes, probably there would be 3 choices: automatic, premul, key. I'm
not sure about the design yet, it's probably not feasible to make the
compositor keep track automatically of what the user did. I'm thinking
there would be some settings that says if the compositor outputs
premul or key, and based on that it could do automatic conversion to
the file format then.
So there would actually be 2 settings, but I would hope that in nearly
all cases the compositor output type can be set to premul and file
format to automatic. This should work for the cases where you use
typical intermediate formats like OpenEXR and TIFF, and do final
output either without alpha or with alpha in a web format like PNG.
> 2- allow switching key/premul in renderlayers regardless of output
> format , and make them a sane and consistent default (regardless of
> output format chosen, maybe something suitable for openexr).
Not sure what you mean by this, where this switching would happen. But
basically anything that comes out of a render engine is naturally
premul. OpenEXR is always premul, and TIFF has metadata to indicate
which alpha type was used. For intermediate formats premul seems the
Layers can be converted to key after rendering but there's no
information to be gained there, and it would give some information
loss for surfaces that are both emissive and transparent (though
that's no so common, maybe for fire volumetrics or so). I think it
would be good to make compositing nodes work by default with premul as
a convention, so blur type nodes would have to do no conversion, and
color correction nodes would optionally convert to key and back.
More information about the Bf-cycles