Jump to content
How to Install Plugins ×
Paint.NET 5.1 is now available! ×

Recommended Posts

Posted (edited)

TR's Scatter Plugin 

 

A Directional Pixel Scattering filter designed to work with Layers and Transparency.

 

Menu:  Effects->Noise

 

Version 1.3 Expanded Features

 

Features include 

- longer spread distance 

- up to 10 layers of particles.

 

TRScatterMenu.PNG?raw=1

 

 

Here's a simple tutorial on YouTube:

 

http://youtu.be/wTShfLVD9_I

 

 

Scatter.png?raw=1

 

Dust%20in%20the%20Wind.png?raw=1

 

The Code

 

Hidden Content:
// Submenu: Noise
// Name: TR's Scatter
// Title: TR's Scatter - v1.3
// Author: TechnoRobbo
// URL: http://www.technorobbo


#region UICode
int Amount1 = 50; // [10,1000] Distance
double Amount2 = 45; // [-180,180] Direction
int Amount3 = 10; // [1,20] Spread
double Amount4 = 50; // [0,100] Threshold
int Amount5 = 1; // [1,20] Layers
byte Amount6 = 0; // [255] Re-Generate
#endregion




void Render(Surface dst, Surface src, Rectangle rect)
{
    dst.CopySurface(src,rect.Location,rect);
   
    double spread = Amount3 * Math.PI /180;
    double direction = Amount2 * Math.PI /180;
    double distance = Amount1;
    Random rndm = new Random((int)Guid.NewGuid().GetHashCode());
    ColorBgra CP;
    double tmp;
    double tmp2;
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        for (int x = rect.Left; x < rect.Right; x++)
        {
            for (int i=0;i<Amount5;i++){
                tmp= rndm.NextDouble() * spread + direction;
                tmp2=Math.Pow(rndm.NextDouble(),4) * distance;
                
                double nx = x + -Math.Cos(tmp) * tmp2;
                double ny = y + Math.Sin(tmp) * tmp2;
                
                CP = src.GetBilinearSampleClamped((float)nx,(float)ny);
                HsvColor hsv = HsvColor.FromColor(CP.ToColor());
                if (hsv.Value > Amount4 && CP.A > 0){ 
                    dst[x,y] = CP;
                    
                }


            }
            
        }
    }
}
 

 

 

TRs Scatter.zip

Edited by TechnoRobbo
  • Upvote 4

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Posted

This plugin is real cool.I can see it used for much more than sigs,like planets disintegrating for one,lol. Now all I need is some time to play. 

 

You are doing an awesome job on these new plugins and I thank you very much. I haven't downloaded all of them because there are a few I don't think I will ever use but the ones I have are making a great addition to the effects that I will use quite often. Loving your work dude! I think you deserve Plugin Writer of the Year! And I smell a TR's plugin pack coming in the future.   ;)

 

                                                              http://forums.getpaint.net/index.php?/topic/21233-skullbonz-art-gallery

Posted

Amazing plugin TR!

I have been experimenting (without much luck) with ways to achieve just this effect. It's like you read my mind! Thank you.

Xkds4Lh.png

  • 2 weeks later...
Posted

Plugin not limited to disintegration

comp86entry17pdnnoob_zpsec24a7e0.jpg

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

Posted

Cheers DD and BBQ.

 

Nice job Skullbonz.

 

@TR.

This is probably a stupid question, but does this only scatter photo images? With pdn image I only get a small scatter and no scatter if the image is on transparent background. Hope this makes sense.

Posted (edited)

slide the threshold slider to the left it will scatter darker pixels too - and increae the distance so it's easiers to see. also try more layers.

 Here's a non  photo PDN example

 

Settings:

Distance 602 pixels.
spread 10
threshold 0 (all pixels)
Layers 14

dug2.png?raw=1.

dug1.PNG?raw=1

Edited by TechnoRobbo

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

  • 2 weeks later...
Posted

Curious to me, at 180 there is falloff in the pixels and I thought the pixels would go straight out as they do at 175. Guess I'm being picky?

 



 

SloppySig.png

Posted (edited)

Doughty,Curious to me, at 180 there is falloff in the pixels and I thought the pixels would go straight out as they do at 175. Guess I'm being picky?

 

I think I know what you mean. The "spread" is added to the "direction" so it always skews it one way - since the rotation is continuous this should not be an issue. below is Red 180° and Blue 175°  with a 10° counter-clockwise(anti-clockwise) spread.

 

scattertest.png?raw=1

 

This looks cool

Edited by TechnoRobbo

Go out there and be amazing. Have Fun, TR
TRsSig.png?raw=1
Some Pretty Pictures Some Cool Plugins

Posted

Oops, I didn't realize that any rotation was involved.  Wondered why the pixels didn't just fly out in the direction chosen. Guess I need to experiment more with this.

Thank you for the explanation.

I really do like the effect.

 



 

SloppySig.png

  • 4 years later...
Posted
22 minutes ago, xXGokyXx said:

How do I add this???

 

Download the zip file from post #1 and copy it to your PDN Effects folder under Program Files.  ?

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