Page MenuHome

Fix T46641: Bicubic transform on ID channel is not bicubic
ClosedPublic

Authored by Sergey Sharybin (sergey) on Nov 8 2015, 4:19 AM.

Details

Summary

Better support of bicubic sampling of ID mask output.

The idea is to generate ID mask into a temporary buffer which is then being
interpolated using current sampling method.

This works fine for upscaling or rotating the ID mask but does not work for
scaling down. This is much-much bigger problem of the compositor design and
can't really be solved currently. Same will happen with other nodes like
blur for example.

Diff Detail

Repository
rB Blender
Branch
master

Event Timeline

Sergey Sharybin (sergey) retitled this revision from to Fix T46641: Bicubic transform on ID channel is not bicubic.
Sergey Sharybin (sergey) updated this object.

While the fix makes sense, IMHO this is typical use-case is working acceptably.
To make this complex in all uses because there *might* be down-scaling seems overkill.

source/blender/compositor/operations/COM_IDMaskOperation.cpp
47

This removes rounding, meaning small errors in float computations could introduce bugs.

It's a pity :( I needed it just for downscaling (I wanted to render bigger and then downscale for antialiasing at the edges)
I'll have to find another workaround then.
Will the compositor design which causes the problem be worked on in any near future?

@Anna Celarek (ania), it's a core flaw in the compositor design. We'll be working on this but there'll be no solution in the neat future. For your particular case you can use AnntiAlias option in the node.

@Campbell Barton (campbellbarton), it's not so complex. Other alternative will go back to a "rolling" buffer which nodes are operating one-by-one. This is just one of corner cases nodes where doing interpolation of the input of simple operation will give totally garbage output and interpolation of simple operation result is required. For that current design requires having a buffer, which is ensured for complex operations.

P.S. There shouldn't be performance changes with the change actually.

This revision was automatically updated to reflect the committed changes.

There are edge artifacts with the AntiAlias option, it's not usable for stronger color changes.
I didn't know if it's a known limitation (because it is no real oversampling) or if it is a bug. I'll submit a bug report on it.