TechnoRobbo Posted July 4, 2013 Share Posted July 4, 2013 (edited) TR's Cloud Control Version 2.0 It's designed to look like clouds not smoke. Uses the Alpha Channel so it can behave as on overlay. Uses Selection to control Cloud Shape (Make sure billows are smaller than selections) 2 Reseed Buttons for 65536 unique renderings (Apply on image, not apply on empty layer ) Version 2.0 Includes: Light/Shadow Control Form clouds with selection Detail Sharpness Control Snazzy new video Version 1.2 includes a Billow Sizeadjustment and a Color Picker (Thanks to Ego for the suggestion) Menu: Effects->Render Let's blow stuff up Let's blow stuff up 2 music by TechnoRobbo Instructions (old version) on Youtube Part 2: http://youtu.be/SkbfK-UcFz0 Instructions (old version) on Youtube Part 3: http://youtu.be/E3k-qCwrco0 Let's blow some more stuff up!!!! Faux Bokeh Genie How it works: Randomly overlays a series of gradient transparent ellipses (up to 10000). Allowing you to adjust transparency thickness and intensity Toxic Skies Created with version 1.2 The Code [hide][/hide] // Submenu: Render // Name: TR's Cloud Control // Title: TR's Clouds Control PlugIn - v2.0 // Author: TechnoRobbo // URL: http://www.technorobbo.com #region UICode byte Amount1 = 0; // [255] Reseed Major byte Amount2 = 0; // [255] Reseed Minor int Amount3 = 2000; // [500,10000] Cloud Thickness int Amount4 = 10; // [1,120] Intensity double Amount5 = 0.1; // [0.01,1] Billow Size double Amount6 = 0.1; // [0.1,1] Sharpness bool Amount7 = true; // [0,1] Alpha Transparency bool Amount8 = true; // [0,1] Constraint to Selection ColorBgra Amount9 = ColorBgra.FromBgr(255,255,255); // Cloud Color Highlight ColorBgra Amount10 = ColorBgra.FromBgr(0,0,0); // Cloud Color Base Pair<double, double> Amount11 = Pair.Create( 0.0 , 0.0 ); // Light Source #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); dst.CopySurface( src,rect.Location,rect); Random rndm = new Random(Amount1 * 256 + Amount2); PdnRegion sreg = EnvironmentParameters.GetSelection(src.Bounds); double CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; double CenterY= ((selection.Bottom - selection.Top) / 2)+selection.Top; int thickness = Amount3; int intensity = Amount4; double smallbillow =Math.Sqrt(CenterX*CenterX + CenterY*CenterY)/25; double largebillow =Math.Sqrt(CenterX*CenterX + CenterY*CenterY)/6; double billow =Amount5; float sharp =(float)Amount6; bool opaque = !Amount7; bool Constrain=Amount8; ColorBgra cloudcolor2 = Amount9; ColorBgra cloudcolor = Amount10; float LiteX = (float)Amount11.First * .5f, LiteY = (float)Amount11.Second * .5f; if (opaque){ //---------------------------------- Graphics g1 = new RenderArgs(dst).Graphics; g1.Clip =new Region(rect); g1.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; //-------------------------------- System.Drawing.SolidBrush BBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); g1.FillRectangle(BBrush , new Rectangle(selection.Top, selection.Left,selection.Width,selection.Height)); BBrush.Dispose(); g1.Dispose(); } for (int i = 0; i<thickness; i ++){ //---------------------------------- Graphics g = new RenderArgs(dst).Graphics; g.Clip =new Region(rect); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; //-------------------------------- float neoChroma =(float )i/(float )thickness; double wide = billow * largebillow + smallbillow - smallbillow * billow; System.Drawing.Drawing2D.GraphicsPath gp =new System.Drawing.Drawing2D.GraphicsPath(); //============================================== Rectangle gpr =new Rectangle(); int timeout = 0; do{ if (timeout ==3000){goto quit;} timeout++; gpr.X = (int)( selection.Left + rndm.NextDouble() * selection.Width); gpr.Y = (int)(selection.Top + rndm.NextDouble() * selection.Height); gpr.Width = (int) wide; gpr.Height =(int) wide; }while ( Constrain && (!sreg.IsVisible(gpr.Left,gpr.Top) || !sreg.IsVisible(gpr.Right ,gpr.Bottom) || !sreg.IsVisible(gpr.Right,gpr.Top) || !sreg.IsVisible(gpr.Left ,gpr.Bottom))); //========================================== gp.AddEllipse(gpr); System.Drawing.Drawing2D.PathGradientBrush pgb = new System.Drawing.Drawing2D.PathGradientBrush(gp); pgb.CenterColor = Color.FromArgb((int)(rndm.NextDouble()*intensity + 8 ), (int)((float)cloudcolor2.R * neoChroma + (float)cloudcolor.R - (float)cloudcolor.R * neoChroma) , (int)((float)cloudcolor2.G * neoChroma + (float)cloudcolor.G - (float)cloudcolor.G * neoChroma), (int)((float)cloudcolor2.B * neoChroma + (float)cloudcolor.B - (float)cloudcolor.B * neoChroma)); cloudcolor.A =0; Color[] colors = { Color.FromArgb(0,255,255,255)}; pgb.SurroundColors = colors; pgb.FocusScales= new PointF(sharp,sharp); float newx = LiteX * neoChroma - LiteX + LiteX * neoChroma; float newy = LiteY * neoChroma - LiteY + LiteY * neoChroma; pgb.CenterPoint= new PointF(gpr.Width * newx + (gpr.Right-gpr.Left)/2 +gpr.Left , gpr.Height * newy + (gpr.Bottom - gpr.Top)/2 + gpr.Top); g.FillEllipse(pgb ,gpr); pgb.Dispose(); quit: gp.Dispose(); g.Dispose(); } ColorBgra CP = dst[0,0]; dst[0,0] = CP; GC.Collect(); } TRsCloudControl.zip Edited December 28, 2015 by TechnoRobbo 1 Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
DrewDale Posted July 4, 2013 Share Posted July 4, 2013 Looks interesting, will try it out. Quote Link to comment Share on other sites More sharing options...
barbieq25 Posted July 4, 2013 Share Posted July 4, 2013 Agree with DD! Must have a play when I get home Quote Knowledge is no burden to carry. April Jones, 2012 Gallery My DA Gallery Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 6, 2013 Share Posted July 6, 2013 Nice plugin! Constructive critique: I think that Cloud Thickness is too powerful. Anything above 30% and you get almost 100% filled selection/layer. I'd reset the scale so that the maximum is 6000 on your current scale, then adjust the scale so it reads 1 to 100 or 1 to 256 (rather than 1000 to 10000). I'd also argue that Intensity is too intense - but not by the same margin. Edit: Why not use the Primary color as the cloud color? Or add a colorwheel so the user can select the color. I want to render pink clouds - not white Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted July 6, 2013 Share Posted July 6, 2013 A quick fiddle with the parameter ranges yields a much less severe effect. And a nicer one IMHO #region UICode byte Amount1 = 0; // [255] Reseed Major byte Amount2 = 0; // [255] Reseed Minor int Amount3 = 30; // [1,100] Cloud Thickness int Amount4 = 32; // [1,100] Intensity bool Amount5 = true; // [0,1] Alpha Transparency #endregion void Render(Surface dst, Surface src, Rectangle rect) { Random rndm = new Random(Amount1 * 256 + Amount2); Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); double CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; double CenterY= ((selection.Bottom - selection.Top) / 2)+selection.Top; int thickness = Amount3 * 50; int intensity = Amount4 * 66 / 100; bool opaque = !Amount5; Example Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
TechnoRobbo Posted July 6, 2013 Author Share Posted July 6, 2013 (edited) EER I like the color picker Idea. The Cloud thickness settings depends on the resolution of the image, larger images, say 2048 wide or higher, benefit from more thickness where as an 800 pixel wide image appears to be over kill. Intensity also makes more sense with larger images. Try your test again with 4096 X 3072 and I think it will all be clear. I'm gonna post my Lightning Plugin (TR's Tesla Coil) first then revisit the Cloud Control. The lightning plugin is chuck full of parametrics. I will add the color picker I think that will be sweet. Thanks!!!! Edited July 6, 2013 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
TechnoRobbo Posted July 6, 2013 Author Share Posted July 6, 2013 EER I am uploading Version 1.2 it includes a color picker and a billow size adjustment. Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 9, 2013 Author Share Posted August 9, 2013 (edited) Version 2.0 Uploaded Light/Shadow Control Form clouds with selection Detail Sharpness Control Snazzy new video music by TechnoRobbo I'll post some more uses for the plugin later - Explosions, Faux Bokeh. Then I'm gong on my vacation! (Holiday - for the more civilized half of the planet) Edited August 9, 2013 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins Link to comment Share on other sites More sharing options...
nitenurse79 Posted August 9, 2013 Share Posted August 9, 2013 Good update. I love the new additions on this (using a selection is a good idea) Thanks for on-going development. A rep point for your hard work Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 9, 2013 Author Share Posted August 9, 2013 (edited) Check out the new samples created with TR's Cloud Control!!!! Let's blow some more stuff up!!!! TR's Cloud Control , TR's Scatter and Paste Alpha Faux Bokeh Ok, now I'm on vacation... see y'all in a week. Edited December 28, 2015 by TechnoRobbo Quote Go out there and be amazing. Have Fun, TRSome Pretty Pictures Some Cool Plugins 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.