TechnoRobbo Posted August 1, 2013 Share Posted August 1, 2013 (edited) TechnoRobbo's Strobe Motion Plugin Version 1.2 Stroboscopic Effect Silmulation. Version 1.2 Solves Large image problem Plugin can be used to imply motion as captured by a strobe light. It can also be used to create extrusions, cloning and other numerous effects. The object should be in the center and placed using the Points control. Not placed where you want it then modified by the Points control. The plugin looks at the layer as a whole and the Points represent the center of the layer at different points in time. This is after all an animation represented in 1 frame ( a temporal Picasso!). Those of you who have done keyframe animation are familiar with theses controls. Menu: Effects->Render Time Flies Example of Cloning: (rotation setting adds realism) Replic-Ants . Twist and Growl Tutorial The Code Hidden Content: // Submenu: Render // Name: TR's Strobe Motion // Title: TR's Strobe Motion - v1.2 // Author: TechnoRobbo // URL: http://www.technorobbo #region UICode Pair<double, double> Amount1 = Pair.Create( 0.0 , 0.0 ); // Point 1 Pair<double, double> Amount2 = Pair.Create( 0.0 , 0.0 ); // Point 2 Pair<double, double> Amount3 = Pair.Create( 0.0 , 0.0 ); // Point 3 Pair<double, double> Amount4 = Pair.Create( 0.0 , 0.0 ); // Point 4 int Amount5 = 5; // [2,25] Frames per Point (3X) double Amount6 = 0; // [-180,180] Start Rotation double Amount7 = 0; // [-180,180] End Rotation double Amount8 = 0; // [0,1] Start Opacity double Amount9 = 1; // [0,1] End Opacity double Amount10 = 0.5; // [0.01,1] Start Size double Amount11 = 0.5; // [0.01,1] End Size #endregion PointF CatmullRom(PointF p0, PointF p1, PointF p2, PointF p3, float t) { PointF ret = new PointF(); float t2 = t * t; float t3 = t2 * t; ret.X = 0.5f * ((2.0f * p1.X) + (-p0.X + p2.X) * t + (2.0f * p0.X - 5.0f * p1.X + 4 * p2.X - p3.X) * t2 + (-p0.X + 3.0f * p1.X - 3.0f * p2.X + p3.X) * t3); ret.Y = 0.5f * ((2.0f * p1.Y) + (-p0.Y + p2.Y) * t + (2.0f * p0.Y - 5.0f * p1.Y + 4 * p2.Y - p3.Y) * t2 + (-p0.Y + 3.0f * p1.Y - 3.0f * p2.Y + p3.Y) * t3); return ret; } void Render(Surface dst, Surface src, Rectangle rect) { try { Rectangle sel = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); int CenterX = ((sel .Right - sel .Left) / 2)+sel .Left; int CenterY = ((sel .Bottom - sel .Top) / 2)+sel .Top; Graphics gn = new RenderArgs(dst).Graphics; gn.Clip = new Region(rect); gn.Clear(Color.FromArgb(0,0,0,0)); gn.Dispose(); PointF p0 =new PointF (CenterX * (float)Amount1.First + CenterX , CenterY * (float)Amount1.Second + CenterY); PointF p1 =new PointF (CenterX * (float)Amount2.First + CenterX , CenterY * (float)Amount2.Second + CenterY); PointF p2 =new PointF (CenterX * (float)Amount3.First + CenterX , CenterY * (float)Amount3.Second + CenterY); PointF p3 =new PointF (CenterX * (float)Amount4.First + CenterX , CenterY * (float)Amount4.Second + CenterY); PointF pt = new PointF(); int frames = Amount5 * 3; for (int t = 0 ; t < frames; t++ ) { float interp = (float)t / (float)frames; //============================================================ Bitmap bmp = new RenderArgs(src).Bitmap; Graphics g = new RenderArgs(dst).Graphics; g.Clip = new Region(rect); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; System.Drawing.Imaging.ColorMatrix matrix = new System.Drawing.Imaging.ColorMatrix(); System.Drawing.Imaging.ImageAttributes IA = new System.Drawing.Imaging.ImageAttributes(); //================================================================= switch ((int)(t/Amount5)) { case 0: pt= CatmullRom(p0,p0,p1,p2,(float)(t % Amount5)/Amount5); break; case 1: pt= CatmullRom(p0,p1,p2,p3,(float)(t % Amount5)/Amount5); break; case 2: pt= CatmullRom(p1,p2,p3,p3,(float)(t % Amount5)/Amount5); break; } //rotate center double m33 = Amount9 * interp + Amount8 - Amount8 * interp; double rot = Amount7 * interp + Amount6 - Amount6 * interp; double sz = Amount11 * interp + Amount10 - Amount10 * interp; //======================== matrix.Matrix33 = (float)m33; IA.SetColorMatrix(matrix, System.Drawing.Imaging.ColorMatrixFlag.Default, System.Drawing.Imaging.ColorAdjustType.Bitmap); //======================== System.Drawing.Drawing2D.Matrix m = new System.Drawing.Drawing2D.Matrix(); m.RotateAt((float)rot,new PointF(pt.X, pt.Y), System.Drawing.Drawing2D.MatrixOrder.Append); g.Transform = m; g.DrawImage(bmp, new Rectangle((int)pt.X - (int)(CenterX * sz),(int)pt.Y - (int)(CenterY * sz) , (int)(bmp.Width * sz), (int)(bmp.Height * sz)), 0, 0, bmp.Width, bmp.Height, GraphicsUnit.Pixel, IA); m.Dispose(); IA.Dispose(); g.Dispose(); bmp.Dispose(); } }catch (Exception e){} } TRsStrobeMotion.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...
barbieq25 Posted August 1, 2013 Share Posted August 1, 2013 This looks like fun! Thanks again TR! Quote Knowledge is no burden to carry. April Jones, 2012 Gallery My DA Gallery Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 1, 2013 Author Share Posted August 1, 2013 (edited) BarbieQ, It really is, and I'm putting that picture at the top of my gallery. I like it. Edited August 1, 2013 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 August 1, 2013 Share Posted August 1, 2013 Great plugin and a great example image TR. This will be fun to use. Cheers 1 Quote Link to comment Share on other sites More sharing options...
dug Posted August 1, 2013 Share Posted August 1, 2013 Wow! an LSD.paper-trail maker(flashbacks). This has got to be fun,downloading now. Cheers TR, in advance, nice share. Off to play. Quote MY GALLERYD.A.TheRawAtom Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 1, 2013 Author Share Posted August 1, 2013 (edited) Welsh, What were your setting - Full rotation & Max frames? Rotation is the most resource intensive. I'll slip a try & catch in the code to assure the stack gets resolved . Wait for v 1.1. I'll pull 1.0 off the post until I add the try & catch Edited August 1, 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 August 2, 2013 Author Share Posted August 2, 2013 (edited) Welsh and All, Version 1.1 is posted Ok, added extra error trapping and trash collection the image below is 4 layers 1900 X 1266, full frames 75 (3X25) per layer and full rotation. Looks like something out of the last Matrix movie https://www.dropbox.com/s/wi2khd4qcja4caw/Welshtest.png?dl=0 Edited December 28, 2015 by TechnoRobbo Linked to image 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...
skullbonz Posted August 2, 2013 Share Posted August 2, 2013 And I thought I was going to bed early tonight,lol. Quote http://forums.getpaint.net/index.php?/topic/21233-skullbonz-art-gallery Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 2, 2013 Author Share Posted August 2, 2013 Welsh No it wasn't your fault. Large images may slow it down but shouldn't under any cirucumstances crash PDN. That's why I had to put safe gaurds in V1.1. I assume you're now using V1.1. I'm glad all is fine now- Please keep me posted if you have any further issues or suggestions. Looking forward to more of your awesome art work. 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...
yellowman Posted August 2, 2013 Share Posted August 2, 2013 (edited) I still have same problem as welshblue even with the final release, to repro it do this - Put "Frames per point (3X)" option to full (25) and play with the Rotation. - When rendering is finished click OK - Open the plugin again you will face the flickering problem, your PC will act crazy By the way, nice plugin though, I needed same like this effect before can't remeber for what, and posted here asking if someone could create it, but this is more than my expectations, thanks so much, I whish if it is a little faster, is ignoring the transparent pixels will speed up the rendering? Edited August 2, 2013 by yellowman 1 Quote My GalleryMy YouTube Channel "PDN Tutorials" Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 2, 2013 Author Share Posted August 2, 2013 Yellow - thank you - I was able to reproduce it using your instructions. Multithreading render using too many open bitmaps. I've changed it to dispose of every bitmap as soon as a frame renders. To All Uploaded V1.2 as of now!!!!!! Give it your worst. Thanks again Yellowman. 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...
yellowman Posted August 3, 2013 Share Posted August 3, 2013 Thanks Techno, I believe now is working flawlessly at least here, Quote My GalleryMy YouTube Channel "PDN Tutorials" Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 3, 2013 Author Share Posted August 3, 2013 Nice graphic. 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...
mottoman Posted August 3, 2013 Share Posted August 3, 2013 First attempt. Will need to try better, it confuses me a little. Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 3, 2013 Author Share Posted August 3, 2013 Motto, Maybe this will explain it better 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...
dug Posted August 5, 2013 Share Posted August 5, 2013 Cool plug-in thanks for sharing. Quote MY GALLERYD.A.TheRawAtom Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 5, 2013 Author Share Posted August 5, 2013 Love it. 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...
mottoman Posted August 5, 2013 Share Posted August 5, 2013 Thanks TechnoRobbo. It has helped a little. I cannot understand how to place objects in a straight line as you have with the Repli-cants image and how Dug has with the figures. all I can manage is a wavy line no matter what setting I use. Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 5, 2013 Author Share Posted August 5, 2013 (edited) Motto Maybe this will help Set both point 1 sliders to -1 Set both point 2 sliders to -0.33 Set both point 3 sliders to 0.33 Set both point 4 sliders to 1 This will create a straight even diagonal render. Set both point 1 sliders to First -1 and Second 0 Set both point 2 sliders to First -0.33 and Second 0 Set both point 3 sliders to First 0.33 and Second 0 Set both point 4 sliders to First 1 and Second 0 This will create a straight even horizontal render. Set both point 1 sliders to First 0 and Second -1 Set both point 2 sliders to First 0 and Second -0.33 Set both point 3 sliders to First 0 and Second 0 0.33 Set both point 4 sliders to First 0 and Second 1 This will create a straight even vertical render. Also... Try to imagine all the Points overlapping like this It will help visualize what the points are doing. 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...
mottoman Posted August 6, 2013 Share Posted August 6, 2013 I followed the first method post above - Set both point 1 sliders to -1 - Set both point 2 sliders to -0.33 - Set both point 3 sliders to 0.33 - Set both point 4 sliders to 1 This will create a straight even diagonal render I end up with this (I maintained all other sliders at default) I have re - downloaded also the plug in again to ensure It is not a fault. There appears to be a clutter of football on the right side. Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 6, 2013 Author Share Posted August 6, 2013 (edited) I think I left out that your object should be centered . since the whole layer is processed (read below). That being said I took your example cutout the ball, centered the ball and ran it through the first method (set size=1 and took out the transparency for clarity) and viola. I think the confusion comes from object placement. the object should be in the center and placed using the Points control. Not placed where you want it then modified by the Points control. The plugin looks at the layer as a whole and the Points represent the center of the layer at different points in time. This is after all an animation represented in 1 frame ( a temporal Picasso!). Those of us who have done keyframe animation are familiar with theses controls. Sorry for the confusion. 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...
mottoman Posted August 6, 2013 Share Posted August 6, 2013 Finally I get it. Thank you for assistance TechnoRobbo. Quote Link to comment Share on other sites More sharing options...
skullbonz Posted August 9, 2013 Share Posted August 9, 2013 (edited) After seeing your explanation I think I finally got how to use it, lol. Just happened to pick butterflies,lol Cool plugin TR. Edited August 9, 2013 by skullbonz Quote http://forums.getpaint.net/index.php?/topic/21233-skullbonz-art-gallery Link to comment Share on other sites More sharing options...
TechnoRobbo Posted August 11, 2013 Author Share Posted August 11, 2013 A butterfly made out of butterflies. Nice. 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...
Tfuzzy2001 Posted August 16, 2015 Share Posted August 16, 2015 How do you do the Twist and Grow? I am trying to figure out how to do it but i can't. 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.