Looking through effect codes

Recommended Posts

I noticed today, After beginning to learn some C lanuages. That your blur effects seem as though there just highly complicated algebraic expressions. Very complicated. although they don't use X and Y varables

I'm only a freshman in highschool. Just curiouse what these are made up of? What part of math and if anything?

Share on other sites

I noticed today, After beginning to learn some C lanuages. That your blur effects seem as though there just highly complicated algebraic expressions. Very complicated. although they don't use X and Y varables

I'm only a freshman in highschool. Just curiouse what these are made up of? What part of math and if anything?

Share on other sites

If you want a high level understanding of how Gaussian Blur is calculated, look it up on Wikipedia.org

Share on other sites

AFAIK, Paint.NET use a rectangle of interest (roi)

public override unsafe void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, int startIndex, int length)

from which it loops from its [Top] to [bottom]...

```Rectangle rect = rois[ri];
if (rect.Height >= 1 && rect.Width >= 1)
{
for (int y = rect.Top; y < rect.Bottom; ++y)
```

... and its Left to Right

```                       for (int x = rect.Left + 1; x < rect.Right; ++x)

{
```

which are basically your y and x axes.

That's just random rambling based on my observations, I haven't got any Computer Science BSc.

Is it what you're looking for?

No. Way. I've just seen Bob. And... *poof!*â€”just like thatâ€”he disappears into the mist again. ~Helio

Share on other sites

From my understanding, the math is quite simple -- take the average color of the pixels inside the radius. It's not any high level math at all.

There are 2 for loops inside the render() function where coloring takes place, and the variable x literally means the x-position of the pixel, and the variable y means the y-position of the pixel.

Also, it's not that hard to learn programming. It will certainly take some time, but read a few books, do some projects, and you are set.

Some links: | Personal Website | Alien Attack |

Try out my plugins: | Antialias | Diagonal Lines |

Share on other sites

From my understanding, the math is quite simple -- take the average color of the pixels inside the radius. It's not any high level math at all.

That is not at all how Gaussian Blur works.

You also need to take into account how far each pixel is away from the one you're working on.

The math is quite complex. Look here: http://en.wikipedia.org/wiki/Gaussian_blur#Mechanics

Join the conversation

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

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.