TechnoRobbo Posted July 24, 2013 Posted July 24, 2013 (edited) TechnoRobbo's Bokeh Plugin a simulation of the Classic photographic effect due to complexity - slow renders on larger images higher the threshold the faster it renders. v2.0+ better threshold control Menu: Effect->Photo Video Demo music by TechnoRobbo Video Demo 2 Bokeh Effect Abstract Perth at Night The Code Click to View Hidden Content: // Submenu: Photo // Name: TR's Bokeh // Title: TR's Bokeh - v1.1 // File Version:1.1 // Author: TechnoRobbo // URL: http://www.technorobbo #region UICode int Amount1 = 16; // [1,128] Size int Amount2 = 3; // [1,15] Brightness int Amount3 = 128; // [1,254] Threshold #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); //---------------------------------- Graphics g = new RenderArgs(dst).Graphics; g.Clip =new Region(rect); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; //BackGround------------------------------- System.Drawing.SolidBrush BBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); g.FillRectangle(BBrush , new Rectangle(sel.Top, sel.Left,sel.Width,sel.Height)); BBrush.Dispose(); g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; //=========================================================================================== System.Drawing.SolidBrush CBrush =new System.Drawing.SolidBrush(ColorBgra.Black); //System.Drawing.Pen CPen = new System.Drawing.Pen(CBrush ,1); System.Drawing.Point[] pt = new System.Drawing.Point[0]; ColorBgra CP; int inc = Amount1; //Test Variable //inc=50; //shape=6; //End Test int rad = Amount1; int rad2 = rad * 2; for (int y = sel.Top; y < sel.Bottom; y ++) { for (int x = sel.Left; x < sel.Right; x ++) { CP = src.GetBilinearSampleClamped(x,y); int intensity = (CP.R | CP.G | CP.; if (intensity>Amount3){ CP.A =(byte) Amount2; CBrush = new System.Drawing.SolidBrush(CP); g.FillEllipse(CBrush, new Rectangle(x-rad, y-rad,rad2,rad2)); } }//x }//y CBrush.Dispose(); g.Dispose(); } TRsBokeh.zip Edited December 28, 2015 by TechnoRobbo 4 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
HELEN Posted July 24, 2013 Posted July 24, 2013 How do I create the middle image with just the circles? And it takes kind of long to create the effect if the image is detailed, but it's a really nice plugin. Thank you! Quote Don't spit into the well, you might drink from it later. -----Yiddish ProverbGlossy Galaxy Ball---How to Make FoliageMy Gallery PDN Fans--My DA
TechnoRobbo Posted July 24, 2013 Author Posted July 24, 2013 Welsh, I just uploaded v1.1 threshold based on saturation not intensity - gives better color control Helen, here's an image created by drawing dots running plugin drawing more dots running plugin again. Maybe that's what you want, The higher you set the threshold the faster it renders. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
TechnoRobbo Posted July 24, 2013 Author Posted July 24, 2013 (edited) Welsh This one uses my pixel sharpener to give those bright outlines Weird. I'd never heard of Bokeh until Monday ... WelshBlue me too!!! I never knew it had a name. I was looking at images of blurs to try and create a simulation and I stumbled on the the name "Bokeh" Super Weird!!! ... I've been working on a tutorial and gotten this far: ... I'll hold back on finishing it Nice, that's Art. My plugin's a simulation - a tool. No sense in holding back. Edited December 28, 2015 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
DrewDale Posted July 24, 2013 Posted July 24, 2013 Started with This Ran your plug in to get this: And after a play around with other plug ins I got this: A great plug in with many uses, thank you. 1 Quote
pdnnoob Posted July 24, 2013 Posted July 24, 2013 I read "TR's Broken Plugin" and thought huh? Cool! Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo
TechnoRobbo Posted July 24, 2013 Author Posted July 24, 2013 if you don't mind I'll go ahead and post it but gear it towards photo manipulation rather than the conventional sense of image. Your plug-in will do that ... Welsh, Heck , I don't mind, that's why I publish my source codes - free knowledge for everyone. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
skullbonz Posted July 24, 2013 Posted July 24, 2013 I thought a Bokeh was something you smoke weed out of,lol. Quote http://forums.getpaint.net/index.php?/topic/21233-skullbonz-art-gallery
blackpenny Posted July 24, 2013 Posted July 24, 2013 I read "TR's Broken Plugin" and thought huh? Cool! Thank God, I'm not the only one! Looks really cool, I'll be playing with it! Quote
Lloyd Posted July 24, 2013 Posted July 24, 2013 Thank God, I'm not the only one! Looks really cool, I'll be playing with it! Make that three of us. I read it first as 'broken' Looks like it could be a good plug-in to explore. Decent example DrewDale. It looks like a lot of other plug-in's were used to get that final image. Quote
Guest Posted April 29, 2014 Posted April 29, 2014 Hey guys, I'm here looking for some sort of bokeh-plugin. This one comes close to the real stuff, but it still looks a little generic. (Still awesome to have it, and for free, so thanks a lot!) Here's a page I stumbled upon some time ago, gets interesting in the middle and it even has the source code at the bottom of the page: http://www.cs.ubc.ca/labs/imager/tr/2012/PolynomialOptics/ Any chance you could do an effect like this in paint.net? Quote
TechnoRobbo Posted April 29, 2014 Author Posted April 29, 2014 (edited) I see Bokeh, Star Filter and lens flares. I have a simulation for Bokeh and my GlamourShot is a star diffusion simulation. I do not have a lens flare but it does exist check the plugins index possibly Madjiks pack Edited May 2, 2014 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
Ishi Posted December 7, 2014 Posted December 7, 2014 (edited) This is an amazing plugin. I was actually wondering what this effect is called like when you use a DLSR, it blurs the background with these fantastic faded circles from a distance. I was a looking for a way to create it artificially. It turns out its called Bokeh. Gaussian blur just doesn't make a blur as good as this. But it renders kinda slow on my computer, even with considerably low resolution and low quality images. I'm using a netbook with Atom processor and 2GBs RAM but many other plugins just render OK with it. Any way this could be made to render faster? Thanks. Edited December 7, 2014 by Ishi Quote
TechnoRobbo Posted December 7, 2014 Author Posted December 7, 2014 Any way this could be made to render faster? I can make it faster but I would have to migrate the code from CodeLab to Visual Studio. I have a couple of other projects right now though. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
Ishi Posted December 7, 2014 Posted December 7, 2014 Thanks. But I see so much great potential with this plugin. Its one of a kind. Don't you think, it should be under Effects>Blurs section instead of Effect>Photo? And maybe add a little icon for this. We can finally edit pictures taken from a phone camera or a digital camera and make them look like as if they were taken by a DLSR. Quote
TechnoRobbo Posted December 7, 2014 Author Posted December 7, 2014 When I transfer it to VS it will, but I have a lot on my plate right now. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
TechnoRobbo Posted December 11, 2014 Author Posted December 11, 2014 Version 2.0 - adds a progress bar for larger images Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
Seerose Posted December 15, 2014 Posted December 15, 2014 Version 2.0 - adds a progress bar for larger images @TechnoRobbo! Thanks so much for sharing. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
ftlog666 Posted June 8, 2015 Posted June 8, 2015 thank you TR now i can make my own instead of those weird 'images' you see it Quote
TechnoRobbo Posted June 8, 2015 Author Posted June 8, 2015 Your Welcome Seerose Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins
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.