MJW Posted May 21, 2021 Share Posted May 21, 2021 Edge Shader is an updated release version of a beta-released plugin written long ago by Red Ochre and me. It shades the edges of objects, based on the distance from the edge. It's in the Object submenu. The DLL (Version 1.0.1; May 21, 2021): Edge Shader.zip The Help menu description: Quote Edge Shader shades pixels based on their distance from the the edge of object to which they belong. The color gradient begins at the edge with the Edge Color and transitions to the Interior Color. The controls are: Opacity Threshold: Specifies minimum opacity for object pixels. Pixels with lower opacity are not considered part of the object, and are not shaded. This value is always 1 when Use Edge Opacity in Determining Distance is enabled. Divide Maximum Distance and Shading Offset by Ten: Specifies that the values set in the Minimum Distance and Shading Offset From Edge should be divided by ten, increasing their precision while their maximum ranges. Maximum Distance: Specifies the maximum distance the color gradient extends. Pixels farther from the edge will be colored the Interior Color. Shading Offset from Edge: Specifies the distance from the edge before the gradient begins. Pixels nearer to the edge will be colored the Edge Color. Gradient Profile: Specifies the profile of the gradient. A value of zero produces a linear gradient. Values less than zero produce gradients that change slowly near the edge, then more rapidly. Values greater than zero produce gradients that change rapidly near the edge, then more slowly. Use Edge Opacity in Determining Distance: Specifies that the opacity of the nearest edge pixel taken into account when determining the distance. Edge Color: Selects the color to shade pixels nearest to the edges of objects. The choices are Primary Color, Secondary Color, Black, White, Original Pixel Color, and Nearest Edge-Pixel Color. Interior Color: Selects the color to shade pixels at the end of the gradient. The choices are the same as for the Edge Color. Blending Mode: Selects the blending mode used to combine the edge shading with the original image. Blending Opacity: Specifies the opacity of the edge shading. The user interface: While this version has a number of new and, I believe, useful features, it's missing one feature I hope to eventually add, and has another feature I hope (perhaps in vain) to improve. @lynxster4 requested the option of offsetting the shading to one side or the other. I'm not certain that's possible, though I think it likely is. In any case, even if it's possible, adding the feature is quite complex. I've decided I've already delayed far too long in releasing the plugin. I will try to include the feature in a future release. @Red ochre requested the ability to get smoother edge shading, without the jaggedness that sometimes occurs, by using the transparency of antialiased object edge pixels to adjust the distances. A partially opaque edge pixel would be interpreted as an object edge that partially extends into the pixel. That's a very good idea, and one I've tried hard to implement. The plugin includes the feature, but I'm not sure how effective it is. The lack of effectiveness certainly isn't for lack of trying. Other than laziness, the primary reason for the delay in the plugin's release is my many experiments to find a way to accurately adjust the distance using the edge transparency. The current method is, I think, quite clever; unfortunately, I don't think it works particularly well. I hope to someday to find a method that works better. An option that may require some explanation is the Offset. The idea is that using that Offset along with various Blending Modes may allow complex edge profiles to be built up by applying the Edge Shader several times. EDIT 1 (21 May 2021): Fix crash when all transparent canvas and edge-transparency distance adjustment enabled. 2 3 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.