BoltBait Posted October 31, 2006 Share Posted October 31, 2006 Download v3.0 DLL here: BoltBait's Plugin Pack There have been many requests for a Feather feature (like this one, this one, and this one) so I decided to create it myself. Thanks goes out to Rick for writing the Gaussian Blur function and to Illnab1024 for sending it to me in Codelab format. If you don't know what feathering is, take a look at this picture: Basically, it softens the edges of objects that you are combining to make composit pictures. Please see this page for :arrow: instructions on how to use it. Enjoy. 8) ============================================= EDIT: I have recompiled this effect with the new CodeLab beta and added an icon to the effect and also added a UI that allows specifying the feather amount (from 1 to 5 with a default of 2). ============================================= EDIT: Updated again. Changed range from 1-5 to 1-10. Also, added the frequently requested freature of a true feather. The original method is called "grow" as it grows the object slightly. The new method is called "shrink" as it makes the edges of the object slightly transparent--the object shrinks slightly. I also moved the effect to the Blurs submenu. Here is the new UI: (4/15/07 update) ============================================= FIXED: Updated DLL to fix the UI bug where it gets confused if you move the sliders back and forth too much. (6/11/07 update) ============================================= FIXED: Fixed a typo. The last time I built this, I accidentally put "feather2" in the menu instead of "Feather". ============================================= NEW: I have rewritten this effect from scratch. The effect now shows up in the Effects > Object submenu. It now includes a third slider to control the strength of the effect. (1/27/2008 update) ============================================= NEW: I have rewritten this effect's UI from scratch. It now uses the IndirectUI of Paint.NET. (2/18/2008 Update) ============================================= FIXED: I have fixed the Paint.NET 3.36 bug. (8/26/2008 Update) ============================================= NEW: I have released version 3.0 Download the update here: BoltBait's Plugin Pack Source code published here: (4/4/2010 Update) Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
TinSoldier Posted October 31, 2006 Share Posted October 31, 2006 This sounds cool-- I look forward to trying it out! Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 31, 2006 Share Posted October 31, 2006 Heh, did you really copy and paste the Gaussian Blur code to do this? That's intense I recommend using composition instead ... basically you just instantiate a BlurEffect instance as part of your effect, and act as a proxy to its Render() method. This makes things much more manageable: the Gaussian Blur code is optimized for performance, and its readability and maintainability suffers as a result. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
BoltBait Posted October 31, 2006 Author Share Posted October 31, 2006 Yes, Rick, Illnab1024 sent me the Gaussian Blur code (which he converted for use in Codelab). Then, I tried to understand it (big mistake--it would help if you'd used decent variable names). I figured it out well enough to modify it to my purpose. Then, I compiled the DLL using Codelab and posted it up. I hope someone finds it useful. I know I will Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Kaiser Yoshi Posted November 1, 2006 Share Posted November 1, 2006 Mmm... this isn't exactly what I'd call a feather. Feathering isn't blurring the edges, it's fading the edges to transparent, which is actually doable with the new gradient tool, to an extent. Not saying this isn't useful, but calling it a feather isn't very accurate. Quote Link to comment Share on other sites More sharing options...
Illnab1024 Posted November 1, 2006 Share Posted November 1, 2006 Would Faux Antialias work for you? But anyway, Feather is the best term here I think, because it is easy for the layman to recognize. Quote ~~ Link to comment Share on other sites More sharing options...
BoltBait Posted November 1, 2006 Author Share Posted November 1, 2006 Mmm... this isn't exactly what I'd call a feather. Feathering isn't blurring the edges, it's fading the edges to transparent, which is actually doable with the new gradient tool, to an extent.Not saying this isn't useful, but calling it a feather isn't very accurate. But, if you think about it, that's EXACTLY what its doing. If you Gaussian blur a pixel that is sitting next to a totally transparent pixel, it becomes slightly transparent. Then, if you blur that transparent pixel, it takes on some of the color of the previous pixel and becomes slightly less transparent. Isn't that exactly what you describe? Anyway, I did some experimenting with it and figured out that the blur that I was applying was too small. I had hard set the Gaussian Blur to a radius of 1. I have changed it to 2, recompiled the DLL and re-posted. Except for the smallest of pictures, it is a big improvement. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
barkbark00 Posted November 1, 2006 Share Posted November 1, 2006 Looks MUCH better. Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
Kaiser Yoshi Posted November 1, 2006 Share Posted November 1, 2006 Mmm... this isn't exactly what I'd call a feather. Feathering isn't blurring the edges, it's fading the edges to transparent, which is actually doable with the new gradient tool, to an extent.Not saying this isn't useful, but calling it a feather isn't very accurate. But, if you think about it, that's EXACTLY what its doing. If you Gaussian blur a pixel that is sitting next to a totally transparent pixel, it becomes slightly transparent. Then, if you blur that transparent pixel, it takes on some of the color of the previous pixel and becomes slightly less transparent. Isn't that exactly what you describe? That would be what I'm describing, if the feathered object were a solid color and nothing more. I made this with the gradient tool, rect to polar, and alpha mask. This is a true feather. On the faded edges, not a single pixel has had an RGB value changed, only the alpha transparency. This is what the feather tool in Fireworks does, and I'm pretty sure that applies to other image editing programs. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 1, 2006 Share Posted November 1, 2006 BoltBait, you might be able to do that by doing Gaussian Blur like you are doing, and after that copying all the RGB values (not alpha) from src to dst in the render rectangle. This will effectively do the Gaussian Blur but mask it to just the alpha channel. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
BoltBait Posted November 1, 2006 Author Share Posted November 1, 2006 Rick, the problem with this is that most of the pixels that are being blurred are completely transparent. But, I'll look again at this for the non-transparent pixels. I'm using the results of the Gaussian blur to slightly expand the size of the new object, not make it smaller. I played around with making the new object smaller (by only making the edges more transparent) and the results were not looking as good--remember my goal, combining natural objects with a natural background. Kaiser Yoshi, you are correct. This effect will not work for EVERY image you can come up with. However, for combining natural images, I think you will find it very useful. EDIT: OK, Rick, I did a test by keeping the RGB values of non-transparent pixels and I couldn't see the difference until I zoomed way in (400%+). And, when I did zoom in and could start to perceive a difference, it didn't look as natural as the regular blur. So, meh. I'm leaving it. Oh, I'm sure you could come up with a pattern that would show a major difference, but like I said, when used to combine one natural picture with another I think the effect is pretty good. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
BoltBait Posted November 3, 2006 Author Share Posted November 3, 2006 OK, I found a bug in this filter. It wasn't properly blurring the bottom and right edge pixel of your selection if your selection was not covering the entire layer. So, if you have not downloaded the DLL since I posted this message, please do so--it has been corrected. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
barkbark00 Posted November 18, 2006 Share Posted November 18, 2006 I don't know how to compile the DLL with an icon, but here is one I made. I was just guessing, but I figured that it had to be 16x16... Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
BoltBait Posted November 18, 2006 Author Share Posted November 18, 2006 Thanks. I don't either. Oh, and I had already made an icon, but I think I like yours better. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
barkbark00 Posted November 18, 2006 Share Posted November 18, 2006 Thats cool. Now I wanna see yours. Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
noobish Posted November 24, 2006 Share Posted November 24, 2006 Um, this is...AWESOME! I have looked everywhere and tried everything to do this but no good. This is great. Woo! Quote Link to comment Share on other sites More sharing options...
Hellfire010 Posted November 28, 2006 Share Posted November 28, 2006 Question: Is it possible to make a similar effect, but instead of "Feathering" it with the transparent pixels, it would work with pixels of the primary color (tolerance changable). Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 28, 2006 Author Share Posted November 28, 2006 Question:Is it possible to make a similar effect, but instead of "Feathering" it with the transparent pixels, it would work with pixels of the primary color (tolerance changable). No, because this is based almost completely on the Gaussian Blur code, this would not be possible.* Sounds like you would want to make helo effects/glow effects. You could put a copy of your object on a new layer, saturate it with the color of your choice, Gaussian Blur that layer, then move that layer below your object. *Yes, of course it could be possible, I'm just too lazy to make it happen. Not to mention the fact that somehow I misplaced the feather source code file... Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Hellfire010 Posted November 28, 2006 Share Posted November 28, 2006 lol, well thanks anyway. I'll try that method ^ Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 28, 2006 Author Share Posted November 28, 2006 Just kidding. Here you go... http://boltbait.googlepages.com/Halo.dll Of course, this is done in Codelab and therefore has no UI. So, I fixed the radius at 5. Once I get setup for making UI's, I'll fix that. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
barkbark00 Posted November 28, 2006 Share Posted November 28, 2006 this is the same as doing a blurred drop shadow at 0x 0y, except you can control the blur with the drop shadow. Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
BoltBait Posted November 28, 2006 Author Share Posted November 28, 2006 Yeah, use that one instead. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
MadJik Posted November 28, 2006 Share Posted November 28, 2006 Is it like Shadow X:0 Y:0 Rad:2/5 ? Yes I so often use shadow effect with x:0 y:0. It is as usefull as a shortcut. GREAT!!!! Thanks a lot! Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Hellfire010 Posted November 29, 2006 Share Posted November 29, 2006 Hmm... I don't think that works right? idk. It like, takes the color and puts an outline gradient of that color in transparent areas... or something O.o Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 29, 2006 Author Share Posted November 29, 2006 Hmm... I don't think that works right? idk. It like, takes the color and puts an outline gradient of that color in transparent areas... or something O.o HAHA! Yes! I totally misunderstood! What this does is put a halo around objects by using the primary color for the halo. I'll see if I can satisfy your request tomorrow when I'm at work. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.