Sign in to follow this  
TechnoRobbo

TR's & EER's Drum Skin v1.3 (Mar 27, 2014)

Recommended Posts

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

DrumSkinMenu.PNG?raw=1

 

V1.1 Video

 

 

The Code:

Hidden Content:
// Submenu: Distort
// Name: TR's & EER's Drum Skin
// Title: TR's & EER's Drum Skin - v1.3
// Author: TechnoRobbo & Ego Eram Reputo
 
#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.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 * (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;
 
        }
    }
 
}
 

TRsDrumSkin.zip

Edited by TechnoRobbo
  • Upvote 7

Share this post


Link to post
Share on other sites

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.  :beer:

  • Upvote 1

Share this post


Link to post
Share on other sites

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.

tester_zps5ddc5595.png

Nice example images from DrewDale, Seerose and Lloyd also.

  • Upvote 3

Share this post


Link to post
Share on other sites

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 with
a modern day salvador dali creation :D

neatclock_zps85626435.png

  • Upvote 3

Share this post


Link to post
Share on other sites

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.

yhsjjie-1154.png

Hidden Content:
  • Upvote 2

Share this post


Link to post
Share on other sites

 

 

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.

  • Upvote 1

Share this post


Link to post
Share on other sites

Do you still have the first version of this ? The new version is no longer showing in V3.5.11. 

Edited by mottoman

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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) :D  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?

Share this post


Link to post
Share on other sites

Sorry, I think the confusion is the name change the new one will appear as

Drumskin%20New%20%281%29.png?raw=1

 

 

 

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 by TechnoRobbo

Share this post


Link to post
Share on other sites

These are the only TR plugin's I have in the Distort sub menu Drum skin is not showing.

submenu_zpsf05b5ee3.jpg

Even though it is in my effects folder (downloaded again Today) 

effects_zpsef0d58df.jpg

 

Do you have the first version of this you could maybe upload again?

Share this post


Link to post
Share on other sites

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

Drumskin%20New.png?raw=1

Edited by TechnoRobbo
  • Upvote 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this