MadJik Posted July 11, 2007 Share Posted July 11, 2007 Sine Wave Distort Effect Plugin What's this? I think it will help for this problem... => How does it works? That uses the function sine to apply a horizontal or vertical shift like a simple or combined wave. While moving, if the image leaves the area on a side then it reappears on the opposite side. TIP: Enlarge the canvas with a transparent border to keep the image 'inside'... Download the DLL Plugin SinWaves.dll Here is the DLL The MadJik's All plugins package is available ! http://forums.getpaint.net/index.php?showtopic=7186 How to install Close Paint.net Classic version of Paint.net Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects Microsoft Store version of Paint.net Unzip and (re)place the DLL in your Effect folder usually: /My Documents/paint.net App Files/Effects/ You have to adapt for your language My Documents The User interface This plugin is added to the menu Effects, submenu Distort. Amplitude (-500,+500, dft 5) __Sine function gives a result between -1 and 1. You could change this range with the amplitude. The waves could be flat (amount near 0) or high (big amount). You could use negative values to invert the waves. Horizontal periods (-500,+500, dft 0) __A period for the function sine is the full "wave" curve going thru the values : 0,1,0,-1,0. You could choose the number of periods you need... Vertical periods (-500,+500, dft 1) __Same for the vertical periods. You could combine Horizontal & Vertical effects... Angle of start (0,360, dft 0) __Choosing the angle allows you to start somewhere in the curse of sine... Anti-alias level (0,10, dft 2) __It's more a local blur than Anti-aliasing. You choose the level (radius) here. _________________ Example: Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
moc426 Posted July 11, 2007 Share Posted July 11, 2007 ofcourse now you need to add anti-aliasing Quote Link to comment Share on other sites More sharing options...
RikkuBubbles Posted July 11, 2007 Share Posted July 11, 2007 I cant use it on my paint.net Quote Bubbles, bubbles, and RIKKU BUBBLES!! Link to comment Share on other sites More sharing options...
dawn Posted July 11, 2007 Share Posted July 11, 2007 Rikku, you're gonna get yelled at if you don't resize your avatar. (It should be no bigger than 100x100px I think.) Quote Link to comment Share on other sites More sharing options...
Leif Posted July 11, 2007 Share Posted July 11, 2007 I cant use it on my paint.net Works OK for me. Thanks MadJik. Great work. RikkuBubbles resize your avater. It is to big. Quote My DA: http://leif-j.deviantart.com/ -------------- Some people seek justice so persistent, that they will do great injustice themselves. Link to comment Share on other sites More sharing options...
The_Lionhearted Posted July 11, 2007 Share Posted July 11, 2007 Oh Madjik, excellent. I've been hoping for something like this for a long time, and it could actually help me out a lot with a project I'm doing for a friend. Thanks! Quote My Gallery Link to comment Share on other sites More sharing options...
Mint Posted July 11, 2007 Share Posted July 11, 2007 You completely solved my problem, Madjik! Awesome plugin. Quote Link to comment Share on other sites More sharing options...
Ash Posted July 12, 2007 Share Posted July 12, 2007 Very nice, Thanks again Quote All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
Mr Frojo Posted July 12, 2007 Share Posted July 12, 2007 I can really see myself using this a ton from here on out. Really wish it had antialising though, but besides that, its great. Quote I'm still alive! Link to comment Share on other sites More sharing options...
MadJik Posted July 12, 2007 Author Share Posted July 12, 2007 You could try this code in CodeLab, it's including anti-aliasing (it's some kind of blur in fact)... I need more time to create the DLL with 4 sliders... int Amount1=500; //[-9999,9999] Amplitude(/100) int Amount2=000; //[-9999,9999] Horizontal periods(/100) int Amount3=100; //[-9999,9999] Vertical periods(/100) void Render(Surface dst, Surface src, Rectangle rect) { PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); int MaxX = dst.Width; int MaxY = dst.Height; int MidX = MaxX/2; int MidY = MaxY/2; double Radius = (double)Amount1 / 100.0; double XCoef = (double)Amount3 / 100.0; double YCoef = (double)Amount2 / 100.0; // Variables for Anti-Aliasing int aaLevel = 2; //Anti-Alias level (no slider!) int aaSamples = aaLevel * aaLevel + 1; PointF[] aaPoints = new PointF[aaSamples]; // Init table for AA (don't ask me how it works) for (int s = 0; s < aaSamples; ++s) { double x = (s * aaLevel) / (double)aaSamples; double y = s / (double)aaSamples; x -= (int)x; // RGSS + rotation to maximize AA quality aaPoints[s] = new PointF((float)x, (float)y); } double xk = 0; if ((Radius !=0) && (XCoef !=0)) xk = 2.0 * Math.PI / (MaxX / XCoef); double yk = 0; if ((Radius !=0) && (YCoef !=0)) yk = 2.0 * Math.PI / (MaxY / YCoef); for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if (aaLevel <=0) { double yreflect = (double)y; if ((Radius !=0) && (XCoef !=0)) yreflect += (double)((Radius * Math.Sin(x * xk)) % MaxY); int dy = (int)(0.5 + yreflect); if (dy < 0) dy += src.Height; if (dy >= src.Height) dy -= src.Height; double xreflect = (double)x; if ((Radius !=0) && (YCoef !=0)) xreflect += (double)((Radius * Math.Sin(y * yk)) % MaxX); int dx = (int)(0.5 + xreflect); if (dx < 0) dx += src.Width; if (dx >= src.Width) dx -= src.Width; dst[x, y] = src.GetBilinearSample(dx, dy); } else { int b = 0, g = 0, r = 0, a = 0; foreach (PointF pt in aaPoints) { double yreflect = (double)(pt.Y + y); if ((Radius !=0) && (XCoef !=0)) yreflect += (double)((Radius * Math.Sin(x * xk)) % MaxY); int dy = (int)(0.5 + yreflect); if (dy < 0) dy += src.Height; if (dy >= src.Height) dy -= src.Height; double xreflect = (double)(pt.X + x); if ((Radius !=0) && (YCoef !=0)) xreflect += (double)((Radius * Math.Sin(y * yk)) % MaxX); int dx = (int)(0.5 + xreflect); if (dx < 0) dx += src.Width; if (dx >= src.Width) dx -= src.Width; ColorBgra sample = src.GetBilinearSampleWrapped(dx, dy); b += sample.B; g += sample.G; r += sample.R; a += sample.A; } dst[x, y] = ColorBgra.FromBgra((byte)(b / aaSamples), (byte)(g / aaSamples), (byte)(r / aaSamples), (byte)(a / aaSamples)); } } } } Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MadJik Posted July 12, 2007 Author Share Posted July 12, 2007 Look at the first post of this topic for the lastest version of the Sine Waves plugin. => Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
barkbark00 Posted July 12, 2007 Share Posted July 12, 2007 :shock: Hypnotized.... Quote Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
Bob Posted July 12, 2007 Share Posted July 12, 2007 Bug report: The OK and Cancel button are inverted. The default PdN dialog layout is : [OK] [Cancel] In this Plugin we have: [Reset All] [Cancel] [OK] Quote No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio Link to comment Share on other sites More sharing options...
Ash Posted July 13, 2007 Share Posted July 13, 2007 Even better Thanks! It's not only good for making flags wave. It is good for many other things, like Patterns for one. I'm gonna have a lot of fun playing with this plugin Quote All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
pyrochild Posted July 13, 2007 Share Posted July 13, 2007 Jeez MadJik, you just keep popping out these great plugins don't you? Are you a secret military AI robot? Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
spike 121 Posted July 13, 2007 Share Posted July 13, 2007 @dawn a few posts back avatars are supposed to be no more than 100 wide, but i see people with more than that, as long as its not an excessive size difference, im not sure anybody cares Quote "No. Dreaming is illegal."~Pyrochild Link to comment Share on other sites More sharing options...
Ash Posted July 13, 2007 Share Posted July 13, 2007 Jeez MadJik, you just keep popping out these great plugins don't you? Are you a secret military AI robot? Yeah, both of you are Quote All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
MadJik Posted July 13, 2007 Author Share Posted July 13, 2007 Bob said: Bug report: The OK and Cancel button are inverted. The default PdN dialog layout is : [OK] [Cancel] In this Plugin we have: [Reset All] [Cancel] [OK] Default fixed...TY for reporting! @Ash: Yes, a lot of possibilities... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Ash Posted July 13, 2007 Share Posted July 13, 2007 That is cool How do you do that? Quote All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
MadJik Posted July 13, 2007 Author Share Posted July 13, 2007 That is cool How do you do that? 1.Gradient 30-60° from corner to corner. 2.Sine Waves: Ampl=max, Hor=+/-0.5, Ver=+/-0.5. 3.Duplcate, F4, Blend mode=Negation 4.Flip layer horizontal 5.Merge down (flip vertical for tests) 6.Rect2polar... Various results... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Ash Posted July 13, 2007 Share Posted July 13, 2007 Ahhh......Rect2polar... Thats what I needed to know Thanks! Quote All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ] Link to comment Share on other sites More sharing options...
Scyphrex Posted July 29, 2007 Share Posted July 29, 2007 Jeez MadJik, you just keep popping out these great plugins don't you? Are you a secret military AI robot?Ya madjik u do keep coming out with some gret plugins. Keep up the good work. Quote My Sitehttp://z4.invisionfree.com/blackskydesigns Link to comment Share on other sites More sharing options...
Scyphrex Posted July 29, 2007 Share Posted July 29, 2007 Yes a good package of plugins this will come in handy. Ty Madjik. Quote My Sitehttp://z4.invisionfree.com/blackskydesigns Link to comment Share on other sites More sharing options...
usedHONDA Posted July 30, 2007 Share Posted July 30, 2007 I've never saw this plugin earlier! Cool. Quote "The greatest thing about the Internet is that you can write anything you want and give it a false source." ~Ezra Pound twtr | dA | tmblr | yt | fb Link to comment Share on other sites More sharing options...
R3VENGE Posted January 5, 2008 Share Posted January 5, 2008 madjik your plugins are awsome!! Quote psn id: R3V-fiR3 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.