Sign in to follow this  
Followers 0
TechnoRobbo

TR's Scatter Plugin v1.3

23 posts in this topic

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
4

Share this post


Link to post
Share on other sites

Can see this being useful on render based sigs ,thanks.

0

Share this post


Link to post
Share on other sites

NICE!  :star:

 

I love how easy this is to use.  Magic!

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

Thanks to a suggestion from Skullbonz I decided to revisit the Scatter Plugin - 

 

Features include a longer spread distance and up to 10 layers of particles.

 

Edited by TechnoRobbo
0

Share this post


Link to post
Share on other sites

Wow,Thank you for updating. Very nice and I'm going to have fun with this.     ;)

0

Share this post


Link to post
Share on other sites

Cool plug-in ,loads of potential, cheers for the share.

Scatter_zps6e438494.jpg

2

Share this post


Link to post
Share on other sites

Cool example dug, very well made sir. B)

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

Thank you TR. for the prompt reply. Everything works perfectly on colours and I have just realised I was working with black when I had the problem.

 

All sorted, thanks again for an amazing plug-in.

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

Im trying to duplicate what you wrote. what settings are you using? V1.3 correct? 

0

Share this post


Link to post
Share on other sites

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
0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0