3
$\begingroup$

Using Corner Pin on an image has an irritating little quirk. It seems to distort the edges of shapes, even when applied in such a way that should cause no change. In the screengrab below, the background shows the difference between the input (the alpha layer of a png), and the same image fed through a Corner Pin node with no distortion. I would expect there to be no difference. Is there a reason why there is a difference, or is this a bug?

Using Subtract instead of Difference shows the image seems offset a bit, rather than blurred (2nd and 3rd screengrabs). enter image description here enter image description here Screengrab of unexpected behavior of Corner Pin node

$\endgroup$
  • $\begingroup$ from first tests run, it looks like CornerPin alters the input by adding a slight blur to the image. If you take an arbitrary render with some noise in it and use the same setup (but comparing the Image output socket instead of the Alpha socket), you'll see that there's a difference everywhere in the image, not only at the edges. $\endgroup$ – aliasguru Apr 18 '18 at 19:04
  • $\begingroup$ could be worth if you report it as a bug on developer.blender.org - if it IS a bug, they'll confirm, if not, they might give you the reason there. $\endgroup$ – aliasguru Apr 18 '18 at 19:07
  • $\begingroup$ Ok, just did: developer.blender.org/T54716 $\endgroup$ – mattgilbertnet Apr 18 '18 at 19:49
  • 1
    $\begingroup$ If you are seeing a "slight blur", I suspect it is poor cubic interpolation. Why it is causing halos is still up for grabs. Are there negative values in the fringe? $\endgroup$ – troy_s Apr 18 '18 at 19:58
  • $\begingroup$ Oo, good question troy_s. Using Subtract instead of Difference shows that this is probably an offset or something rather than a blur. I edited the question with screengrabs to show this. $\endgroup$ – mattgilbertnet Apr 18 '18 at 20:06
4
$\begingroup$

While I cannot be certain, I strongly suspect that you have been greeted by one of the many reasons that PNGs are a cancer; their alpha values are unassociated by design, making them an absolutely worthless default in a visual effects / CGI context.

$\endgroup$
  • $\begingroup$ I'm open to trying other formats. But this halo thing doesn't happen with any of the other basic Distort nodes in an arrangement like this. If the Corner Pin node here is replaced by a Translate, Transform, Scale, Rotate, or any other Distort node with settings that you'd expect to result in no change, the output of Difference is solid black. $\endgroup$ – mattgilbertnet Apr 18 '18 at 18:44
  • $\begingroup$ Also, I'm using the alpha layer here as a black and white image, not using any Alpha Overs or Overlays or anything. I can't imagine how the file format would effect how it's handled here. $\endgroup$ – mattgilbertnet Apr 18 '18 at 18:48
  • $\begingroup$ A .tif with transparency has the same result. $\endgroup$ – mattgilbertnet Apr 18 '18 at 18:55
  • 2
    $\begingroup$ On a side note, PNG is a cancer... $\endgroup$ – aliasguru Apr 18 '18 at 18:59
  • 1
    $\begingroup$ The only format with native associated alpha in Blender is EXR. TIFF has been mangled up thanks to the design decision in Blender to treat all 8 bit imagery as unassociated, despite the specification being quite clear that TIFF should encode associated. That said, hopefully the core issue can be resolved, as it doesn't appear alpha related? $\endgroup$ – troy_s Apr 18 '18 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.