[Bf-committers] Alpha clamping in render layers node

gespertino at gmail.com gespertino at gmail.com
Tue Jan 17 19:57:59 CET 2012


2012/1/17 Brecht Van Lommel <brechtvanlommel at pandora.be>:

> I think clamping alpha to a valid range way can always be done, no
> option is needed. However, it needs to be done on any render output,
> not in a compositing node. For example saving directly to EXR without
> nodes enabled or doing full sample re-compositing also needs this, so
> the clamping code should elsewhere. Also note that both the combined
> and color passes have an alpha channel, so ideally both would be
> clamped.

That's interesting. I just checked the render passes and they also
have negative values caused by the AA algos.
But the negative values are present in RGB. They are RGBA but their
alpha channel is fully opaque, so there is no need to clamp it, since
it's already 1.

Some time ago I asked why passes didn't have rendered alpha assigned
and I was told it wasn't a good idea to do so.
In my opinion that would be very useful when working with OSA since
those passes could be treated like passes with associated alpha and a
simple predivide would be enough to composite them properly without AA
artifacts.
I didn't check the maths but I wonder if doing that pre-clamping alpha
wouldn't be useful in that case too to cancel those negative values in
RGB without having to clamp the passes.


More information about the Bf-committers mailing list