ownage Posted August 27, 2006 Share Posted August 27, 2006 (edited) Download Just unzip this file and save the dll file in your /Program Files/Paint.NET/Effects folder. Code Lab Code Spoiler // filter kernel const int size = 5; // odd number //play around with the matrix for interesting effects. int[,] conv = new int[size, size] { {-1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1}, {-1, -1, 30, -1, -1}, {-1, -1, -1, -1, -1}, {-1, -1, -5, -1, -1}, }; unsafe void Render(Surface dst, Surface src, Rectangle rect) { int radius = (size-1)/2; for(int y = rect.Top; y < rect.Bottom; y++) { int top = y - radius, bottom = y + radius; if (top < 0) top = 0; if (bottom >= dst.Height) bottom = dst.Height - 1; for (int x = rect.Left; x < rect.Right; x++) { int left = x - radius, right = x + radius; int c = 0, s = 0, r = 0, g = 0, b = 0; if (left < 0) left = 0; if (right >= dst.Width) right = dst.Width - 1; for (int v = top; v <= bottom; v++) { ColorBgra *pRow = src.GetRowAddressUnchecked(v); int j = v - y + radius; for (int u = left; u <= right; u++) { int i = u - x + radius; int w = conv[i, j]; ColorBgra *pRef = pRow + u; r += pRef->R * w; g += pRef->G * w; b += pRef->B * w; s += w; c++; } } dst[x, y] = ColorBgra.FromBgr( Int32Util.ClampToByte(b), Int32Util.ClampToByte(g), Int32Util.ClampToByte(r)); } } } Edited May 23, 2020 by Ego Eram Reputo Updated toon filter to Null54's version Quote Link to comment Share on other sites More sharing options...
B1lancer Posted August 27, 2006 Share Posted August 27, 2006 Interesting filter, I'll have to have a play with this one! Thanks! Quote Link to comment Share on other sites More sharing options...
B1lancer Posted August 27, 2006 Share Posted August 27, 2006 I seem to get a different effect when I apply the filter to the picture at the top, are you going to add a way to adjust the level of the filter? You can get a good effect if you take a picture, duplicate the layer, apply the filter to the top level and play with the opacity. Quote Link to comment Share on other sites More sharing options...
ownage Posted August 27, 2006 Author Share Posted August 27, 2006 you can get a pencil sketch kind of effect. intensity of the filter is controlled by the size of the filter kernel matrix, bigger matrix = higher intensity. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 28, 2006 Share Posted August 28, 2006 Cool plugin, might have to look at adding something like this for a 2.7x update Is that Rachel Bielson? I can think of only positive things to say about her ... ha! 1 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...
trickman Posted August 28, 2006 Share Posted August 28, 2006 Is that Rachel Bielson? I can think of only positive things to say about her ... ha! LOL! Quote Link to comment Share on other sites More sharing options...
BoltBait Posted August 30, 2006 Share Posted August 30, 2006 I love your Toon filter, but it needs an icon in the effects menu. Oh, and I've noticed that the TOON filter interacts nicely with other filters. For example, taking your original image I did a Frosted Glass (1), TOON, Blur (1): This gives is a very rough look (crayons?) that I really like. I think a lot can be learned by looking at the source code to this effect. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
RaveN Posted August 30, 2006 Share Posted August 30, 2006 I go for more of a ditigalized look I guess if you can call it that. I gotta get on my fast comp to do this though. Take a pic, TOON it, then blur it 1-2 px Quote Link to comment Share on other sites More sharing options...
receding tsunami Posted August 31, 2006 Share Posted August 31, 2006 It works perfect. Thank you very much. Quote Link to comment Share on other sites More sharing options...
Naxul Posted August 31, 2006 Share Posted August 31, 2006 wow...it works great! I wonder if they could make a plug-in to do the opposite... Quote Made with paint.net ^^ Link to comment Share on other sites More sharing options...
psyched Posted September 1, 2006 Share Posted September 1, 2006 Is there any way to actually adjust anything in this plugin? All i can do is "Tool", and then my img gets changed, but after two times "Tool" there is nothing new anymore... Quote Link to comment Share on other sites More sharing options...
popel Posted September 17, 2006 Share Posted September 17, 2006 @ ownage it'S a really good PlugIn, but how did you do pics like your first? I can't!? It don't looks like your's... Quote Link to comment Share on other sites More sharing options...
davidtayhs Posted December 9, 2006 Share Posted December 9, 2006 Discovered one way to improve the results for some pictures: 1. Apply the toon effect to the background pic 2. Copy the toon effect to the clipboard 3. Undo the toon effect on the background to get its original state 4. Create a new layer, paste the clipboard contents, and then going to the Layer --> Layers Property, adjust the opacity to about 139 or whatever setting suits your eye. 5. Flatten the immage. I think these steps create quite lovely pictures. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted December 9, 2006 Share Posted December 9, 2006 davidtayhs, that sounds similar to what I described in this post: http://paintdotnet.12.forumer.com/viewtopic.php?t=2785 (scroll down about half way and you'll see this picture...) Here is how to make this picture: Before you begin, you'll need the Toon effect plugin and optionally the Pastel effect plugin. Open an image. It opens on the background layer. Duplicate the background layer. Call this layer "outline". Make it invisible for now. Select the backgound layer and run the Oil Paint effect (defaults). Now Gaussian Blur the background layer with Radius 1. Select the background layer and run the Glow effect. Radius 6, lower the contrast, adjust the brightness as desired. I used -78 on both for this picture. (Or, you could just run the crappy Pastel effect I wrote.) Select the "outline" layer and make it visible. Run the Toon effect on the outline layer. Now select Adjustments > Black and White. Create a new layer called "Eyes". Select the "outline" layer and lasso the whites of the eyes. You'll have to do these one at a time. Copy the white area of the eyes and paste it into the new "Eyes" layer. When done with that, select the "Eyes" layer and Gaussian Blur it with a Radius 1. Select the "Outline" layer and change the properties to Blending Mode: Darken. That's it. NOTE: You don't have to do all of these steps anymore. I have created an effect that will do them all for you! Download it here: https://forums.getpaint.net/topic/3474-ink-sketch-effect-plugin-now-with-source-code/ Enjoy. 😎 1 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
davidtayhs Posted December 9, 2006 Share Posted December 9, 2006 Nope, your technique definitely gives superior results. Didn't think of combining so many effects together - Oil Paint, Gaussian Blur, Glow, Toon effect etc! Was experimenting to get a better result from the Toon effect. Liked your result so much I printed out the steps and the photo for reference. Thanks. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted December 9, 2006 Share Posted December 9, 2006 Nope, your technique definitely gives superior results. Thanks! I'm always on the lookout for techniques that would take a normal photograph and turn it into something "drawn". To me, this makes it look as if the picture was drawn in pen and painted with water colors. This technique is the closest I've come using Paint.NET. BTW, sometimes it looks better to use "Screen" instead of "Darken" in the last step. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted December 9, 2006 Share Posted December 9, 2006 You might try utilizing the "Outline" effect as well (comes with 3.0). 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 December 9, 2006 Share Posted December 9, 2006 Rick, I've tried it, but honestly the Toon filter gives MUCH better results. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
munchkinmann Posted December 31, 2006 Share Posted December 31, 2006 didn't work that well with the pic i used, you need one with lots of potential lines. Actually, i did it without the oil paint and pastel effect 9the pastel effect sorta sucks, sorry) but lots of glow and it looked good. Quote Link to comment Share on other sites More sharing options...
The_Lionhearted Posted February 23, 2007 Share Posted February 23, 2007 Tooned. Beautiful plugin. Quote My Gallery Link to comment Share on other sites More sharing options...
davidtayhs Posted October 12, 2007 Share Posted October 12, 2007 Found a simple way to use the Toon effect to make beautiful pictures by combining it with the Ed Harvey Surface Blur effect: 1. Open the picture that you want to apply the Toon effect on. 2. Duplicate this layer so that you have two layers with the same picture. 3. Apply the Toon effect onto the new layer (the top layer on the Layers' window). 4. Apply the Ed Harvey Surface Blur effect onto the 'tooned' layer. 5. Going to the Layers' menu --> Layer's Properties --> Keep the mode 'Normal' but reduce opacity to about 140. 6. Flatten the layers. 7. Admire your finished product - lol! Quote Link to comment Share on other sites More sharing options...
Sk8rboy1091 Posted February 10, 2008 Share Posted February 10, 2008 it could use a bit of work... i think this one will be great once you make all the necessary tweaks to it Quote if you have any better suggestions for my sig, pm me... Link to comment Share on other sites More sharing options...
Engima Posted April 27, 2008 Share Posted April 27, 2008 Is that Rachel Bielson? I can think of only positive things to say about her ... ha! LOL! That is Gally, Rick Brewster. Quote "Puyo~! I'm Wapiku~chan!"-Wapiku, from Goldfish Waring! Link to comment Share on other sites More sharing options...
Zac 117 Posted June 19, 2009 Share Posted June 19, 2009 Really cool plug-in. Quote "Killing a man for killing a man only leaves a bigger mess on the floor." -yours truly Link to comment Share on other sites More sharing options...
AndrewDavid Posted May 8, 2017 Share Posted May 8, 2017 (edited) On 10/11/2007 at 6:46 PM, davidtayhs said: Found a simple way to use the Toon effect to make beautiful pictures by combining it with the Ed Harvey Surface Blur effect: 1. Open the picture that you want to apply the Toon effect on. 2. Duplicate this layer so that you have two layers with the same picture. 3. Apply the Toon effect onto the new layer (the top layer on the Layers' window). 4. Apply the Ed Harvey Surface Blur effect onto the 'tooned' layer. 5. Going to the Layers' menu --> Layer's Properties --> Keep the mode 'Normal' but reduce opacity to about 140. 6. Flatten the layers. 7. Admire your finished product - lol! @davidtayhs Thanks for the mini tutorial. It works very well - at least to my liking. Edited January 5, 2019 by AndrewDavid Refreshed Link Quote 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.