TechnoRobbo Posted March 25, 2014 Share Posted March 25, 2014 TechnoRobbo's & Ego Eram Reputo's Drum Skin A Plugin that Re-Maps Rectangular Images into Circular Images. Originally designed for Bass Drum Skin Text http://forums.getpaint.net/index.php?/topic/28071-how-to-make-text-into-a-circle/?p=406359 v1.4 - PDN 3.5 Compatible Menu: Effects->Distort V1.1 Video The Code: // Submenu: Distort // Name: TR's & EER's Drum Skin // Title: TR's & EER's Drum Skin - v1.3 // Author: TechnoRobbo & Ego Eram Reputo // URL: http://www.technorobbo.com #region UICode double Amount1 = 0.5; // [0,1] Intensity double Amount2 = 1; // [0,1] Magnify X double Amount3 = 1; // [0,1] Magnify Y int Amount4 = 50; // [25,75] Width int Amount5 = 50; // [25,75] Height #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.SelectionBounds; float CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; float CenterY= ((selection.Bottom - selection.Top) / 2)+selection.Top; float offx=0,offy=0; ColorBgra CurrentPixel; for (float y = rect.Top; y < rect.Bottom; y++) { for (float x = rect.Left; x < rect.Right; x++) { float nx = (x - CenterX); float ny = (y - CenterY); nx /= CenterX * (float)Amount4/50; ny /= CenterY * (float) Amount5/50; offx = nx / (float)Math.Sqrt(1 - Amount1 * (ny * ny))* CenterX * (float)Amount2 + CenterX; offy = ny / (float)Math.Sqrt(1 - Amount1 * (nx * nx))* CenterY * (float)Amount3 + CenterY; CurrentPixel = src.GetBilinearSample((float)offx,(float)offy); dst[(int)x,(int)y]=CurrentPixel; } } } Download >>>>TRsEERsDrumSkin.zip 7 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...
Ego Eram Reputo Posted March 25, 2014 Share Posted March 25, 2014 I tawt I taw a puddy tat! Just to be clear, rectangular image become ellipsoid, and square become circular. Cool name for the plugin! 2 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...
DrewDale Posted March 25, 2014 Share Posted March 25, 2014 Cool plugin TR. Great fun and a great name too. 4 Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 25, 2014 Author Share Posted March 25, 2014 Ego, you did , you did taw a puddy tat Drew, cool - reflection makes it work. 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...
Seerose Posted March 25, 2014 Share Posted March 25, 2014 TechnoRobbo! Thank you so much for this Plugins and for the effort. 3 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 25, 2014 Author Share Posted March 25, 2014 (edited) Nice Seerose - took me second to figure it out- you kept hitting Ctrl-F. Edited March 25, 2014 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...
Lloyd Posted March 25, 2014 Share Posted March 25, 2014 A very good plug in, I have used it as inspiration for the sig of the week#103. I can see a lot of potential use with this. Thank you TechnoRobbo. 1 Quote Link to comment Share on other sites More sharing options...
mottoman Posted March 25, 2014 Share Posted March 25, 2014 Much fun. Thank you TR. for the effect on the lower image - I ran drum skin, then trial and then drum skin one more time. Nice example images from DrewDale, Seerose and Lloyd also. 3 Quote Link to comment Share on other sites More sharing options...
nitenurse79 Posted March 25, 2014 Share Posted March 25, 2014 Brilliant plug in Techno. And some very creative examples shown here too. Love your plug in's Here's one. Using the first part of This Tutorial from Welshblue. Adding a clock face, then playing with this plug in, I have come up witha modern day salvador dali creation 2 Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 25, 2014 Author Share Posted March 25, 2014 NiteNurse - Brilliant - I'd give you a rep but my daily quota is up. I'll get you tomorrow 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 March 25, 2014 Share Posted March 25, 2014 NiteNurse - Brilliant - I'd give you a rep but my daily quota is up. I'll get you tomorrow Awww. Bless you Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 25, 2014 Author Share Posted March 25, 2014 Motto and Llyod - extremely creative Motto - that bottom one is wild. 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...
Ego Eram Reputo Posted March 26, 2014 Share Posted March 26, 2014 If I may be so bold..... With a couple of little changes to your code, the image can be further distorted to get a round result from a rectangular canvas. I took the liberty and added two controls, Height and Width. These can be used as a pseudo resize if you don't want the result to fill the canvas to the edges. Hidden Content: /* ========================================================================== */ /* */ /* DrumSkin 1.2.cs */ /* (c) 2014 TechnoRobbo (EER remix) */ /* */ /* Description: Transforms a rectangular canvas to a circular/ellipsoid */ /* */ /* ========================================================================== */ // Submenu: Distort // Name: TR's Drum Skin // Title: TR's Drum Skin - v1.2 // Author: TechnoRobbo - EER remix // URL: http://www.technorobbo.com #region UICode double Amount1 = 1; // [0,1] Intensity int Amount2 = 50; // [25,75] Width int Amount3 = 50; // [25,75] Height #endregion void Render(Surface dst, Surface src, Rectangle rect) { Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); float CenterX = ((selection.Right - selection.Left) / 2)+selection.Left; float CenterY= ((selection.Bottom - selection.Top) / 2)+selection.Top; float offx=0,offy=0; ColorBgra CurrentPixel; for (float y = rect.Top; y < rect.Bottom; y++) { for (float x = rect.Left; x < rect.Right; x++) { float nx = (x - CenterX); float ny = (y - CenterY); nx /= CenterX*Amount2/50; ny /= CenterY*Amount3/50; offx = nx / (float)Math.Sqrt(1 - Amount1 * (ny * ny))* CenterX + CenterX; offy = ny / (float)Math.Sqrt(1 - Amount1 * (nx * nx))* CenterY + CenterY; CurrentPixel = src.GetBilinearSample((float)offx,(float)offy); dst[(int)x,(int)y]=CurrentPixel; } } } 2 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 March 26, 2014 Author Share Posted March 26, 2014 If I may be so bold.....With a couple of little changes to your code, the image can be further distorted to get a round result from a rectangular canvas. I took the liberty and added two controls, Height and Width. And if I may be so bold as to incorporate your code and add magnification sliders and include your name in the Title TR's & EER's Drumskin Version 1.3 uploaded. 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 March 26, 2014 Share Posted March 26, 2014 (edited) Do you still have the first version of this ? The new version is no longer showing in V3.5.11. Edited March 26, 2014 by mottoman Quote Link to comment Share on other sites More sharing options...
Goonfella Posted March 26, 2014 Share Posted March 26, 2014 I have the same problem. I have tried installing this twice and even though it is listed in the PDN Effects file it does not show up in the program . The previous version was fine. Quote Please feel free to visit my Gallery on PDNFans And my Alternatives to PDN Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted March 26, 2014 Share Posted March 26, 2014 And if I may be so bold as to incorporate your code ..... and include your name in the Title You have my permission (and thanks) I don't really think my little bit of code should grant me co-authorship - I'm still bewildered by the remapping code even though it is listed in the PDN Effects file it does not show up in the program @ TR - have you ported the CodeLab source to VS? 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...
Lloyd Posted March 26, 2014 Share Posted March 26, 2014 Also I have the same problems as mottoman an Goonfella. New version is in the effects folder, but no show in the menu Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 26, 2014 Author Share Posted March 26, 2014 (edited) Sorry, I think the confusion is the name change the new one will appear as it was compiled under vista to be 3.5 compatible - sorry again I don't really think my little bit of code should grant me co-authorship - I'm still bewildered by the remapping code - EGO Heck I didn't come up with the algorithm - Pythagoras did. Edited August 11, 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 March 27, 2014 Share Posted March 27, 2014 These are the only TR plugin's I have in the Distort sub menu Drum skin is not showing. Even though it is in my effects folder (downloaded again Today) Do you have the first version of this you could maybe upload again? Quote Link to comment Share on other sites More sharing options...
DrewDale Posted March 27, 2014 Share Posted March 27, 2014 Same here, no longer showing in the menu for me either PDN-3.5.11. Quote Link to comment Share on other sites More sharing options...
TechnoRobbo Posted March 27, 2014 Author Share Posted March 27, 2014 (edited) My apologies again - I must have messed up moving it from Windows 7 to my NAS drive to my Vista back to my NAS back to my Windows7 I uploaded v1.4 is should look like this Edited August 11, 2015 by TechnoRobbo 3 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...
Seerose Posted March 27, 2014 Share Posted March 27, 2014 Thank you again. It worked. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
mottoman Posted March 27, 2014 Share Posted March 27, 2014 Happy to see it working again. Thank you again TR & EER for the new tweaks. 2 Quote Link to comment Share on other sites More sharing options...
DrewDale Posted March 27, 2014 Share Posted March 27, 2014 Nice job TechnoRobbo / EER. It runs and works perfectly now. Nice new additions too. 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.