Jump to content
How to Install Plugins ×

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


Recommended Posts

This really is TechnoRobbo's baby.  I just helped deliver it :lol:  

Link to comment
Share on other sites

  • 3 months later...

The code looks like that the selection is just used to define the center. I propose to respect the selection size too (see radiusX/Y)

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 radiusX = CenterX - selection.Left;
    float radiusY = CenterY - 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 /= radiusX * (float)Amount4/50;
            ny /= radiusY * (float) Amount5/50;
            
            offx = nx / (float)Math.Sqrt(1 -  Amount1 * (ny * ny))* radiusX * (float)Amount2 + CenterX;
            offy = ny / (float)Math.Sqrt(1 -  Amount1 * (nx * nx))* radiusY * (float)Amount3 + CenterY;
            
 
            CurrentPixel = src.GetBilinearSample((float)offx,(float)offy);
            dst[(int)x,(int)y]=CurrentPixel;
 
        }
    }
 
}
 
  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

OH ................... I only just noticed this Plugin - late to the party again.  What a great result ..... I love it!  I got one of my cats to be the model :P

 

QNYYaW3.png

  • Upvote 2

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

That sounds like a good idea - threw this together to answer a forum question to create a bands Kick Drum Logo - hence the name Drum Skin

 

I guess you are one of the guys who can imagine the math. It's just more than some formulas.

It took me a small while to figure out that the center variable is used as a point and as a distance. This was the confusing part of the algorithm.

But as you said, a quick hack.

midoras signature.gif

Link to comment
Share on other sites

  • 1 year later...

Thank You!!

 

Some people will look how to bulge text. This effect can give text or shapes a bulge effect. This is how I did it: 

 

1. Type your text.

2. Center the text

3. Use TR's and EER's Drum Skin effect.

 

By the way, The rugby ball was just a rectangle. I did the same thing as above. 

 

drum-skin-text-bulge-4ec5799.png

Edited by Eli
  • Upvote 1
Link to comment
Share on other sites

Refreshed the download with an up-to-date version (1.3) & also added an icon.

  • Like 1
  • Hooray 1
Link to comment
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.

×
×
  • Create New...