Page MenuHome

Added a "Sharpen Less" kernel for the Filter Compositor node
ClosedPublic

Authored by Colin Basnett (cmbasnett) on Feb 5 2022, 4:10 AM.

Details

Summary

Added a new "Sharpen Less" kernel to the filter compositor node. The intent here is to provide a much less aggressive sharpening filter that can't simply be solved by toning down the factor on the existing sharpen filter.

The existing "Sharpen" filter uses a "box" kernel:

-1 -1 -1
-1  9 -1
-1 -1 -1

The new "Sharpen Less" filter uses a "diamond" kernel:

 0 -1  0
-1  5 -1
 0 -1  0

The difference between the two is clear to see in the following side-by-side:

Below shows the difference between the filtering kernels as applied to a B&W render of Suzanne with the UV grid as a texture. The left side of the render using the existing "Sharpen" filter, and the right side showing the new "Sharpen Less" filter. Notice that the left side is more aggressive in accentuating localized contrasts across the image. This can lead to what appears to be aliasing or striations in the resulting image:

https://developer.blender.org/T95275
https://blender.community/c/rightclickselect/57Kq/?sorting=hot

Diff Detail

Event Timeline

Colin Basnett (cmbasnett) requested review of this revision.Feb 5 2022, 4:10 AM
Colin Basnett (cmbasnett) created this revision.
Colin Basnett (cmbasnett) edited the summary of this revision. (Show Details)
Colin Basnett (cmbasnett) edited the summary of this revision. (Show Details)

Results look nice! This is more of a personal preference but why not rename the current sharpen to "Box sharpen" and name the new one "Diamond sharpen"? You can use the tooltip (which is currently empty) to explain that box is more aggressive than diamond.

As requested, I've renamed the two sharpening filters to "Box Sharpen" and "Diamond Sharpen" along with a short tooltip description of each one.

Thank you for your patch!

This revision is now accepted and ready to land.Feb 7 2022, 8:47 AM
Hallam Roberts (MysteryPancake) added inline comments.
source/blender/makesrna/intern/rna_nodetree.c
468

Maybe this should also be changed to SHARPEN_BOX for consistency ?