# Point Blur Effect

21 replies to this topic

### #1 Boude

Boude
• Members
• 592 posts
• LocationThe Netherlands
• Reputation:1

Posted 12 September 2010 - 10:00 AM

Hello everyone,

I'm back. Not with some easy to make image. No, I've got something you might actually use: Point Blur.

Point Blur is a simple effect, doing the reverse of Zoom Blur. Whereas Zoom Blur blurs away from a certain point, Point Blur blurs to this point, hence Point Blur.

A couple of therms used in replies:
Point: the pixel, user defined, that's the centre of the point blur.
Current pixel: a plugin steps through each pixel, the "current pixel" is the pixel, he is calculating the colour for.
Step loop: the loop used to step through the pixels between current pixel and point.

A glance under the hood, requires some knowledge of mathematics:
Point Blur works by averaging the colours of the pixels in the line of that pixel and the point chosen.
For example:
Current Pixel = 0,0 (Coordinates (X,Y))
Point Chosen = 3,0
Pixel 1,0 = Black
Pixel 2,0 = White
Current Pixel is the average of the colours of the pixels in the line of itself and the point chosen (1,0 and 2,0), so it will be gray. Not all pixels are so simple, but with some application of trigonometric functions, it works.

The new render method uses the distance from the current pixel to affect the colour; longer distance, less effect on current pixel.

Enjoy.

Source:
Hidden Content:

Edited by Boude, 16 September 2010 - 06:18 PM.

• 0

History repeats itself, because nobody was paying attention the first time.

### #2 Sarkut

Sarkut
• Competition Hosts
• 3,206 posts
• Reputation:4

Posted 12 September 2010 - 11:17 AM

Most excellent. Thanks.
• 0

### #3 barbieq25

barbieq25
• Moderators
• 4,810 posts
• LocationQueensland, Australia
• Reputation:189

Posted 12 September 2010 - 12:13 PM

I like this idea. Many thanks!
• 0

Knowledge is no burden to carry.

April Jones, 2012

Gallery

My DA Gallery

### #4 Lance McKnight

Lance McKnight
• Members
• 1,230 posts
• Reputation:4

Posted 12 September 2010 - 01:14 PM

Thank you so much for this! I had been hoping for a blur that actually blur to a vanishing point! Nice name for the plug-in!
• 0

Officially retired from this forum. Have a nice day.

### #5 Boude

Boude
• Members
• 592 posts
• LocationThe Netherlands
• Reputation:1

Posted 12 September 2010 - 01:20 PM

Thanks guys, this plugin was the reason I started learning C#. I missed it, so now we're united.

If anyone has any functions, he would look to see implemented in the plugin, feel free to ask.

BTW, if anyone would like a look at the source, feel free to ask. Note: no comments.

Edited by Boude, 12 September 2010 - 01:30 PM.

• 0

History repeats itself, because nobody was paying attention the first time.

### #6 Goonfella

Goonfella
• Members
• 2,185 posts
• LocationThe Rock
• Reputation:36

Posted 12 September 2010 - 04:44 PM

Nice plug in Boude. Works a treat.
• 0

### #7 Mayor_McSteeze

Mayor_McSteeze
• Members
• 563 posts
• Reputation:2

Posted 13 September 2010 - 03:43 AM

If i may say so,
This is quite sexy. No lie.
• 0

### #8 PsychoHarmonic

PsychoHarmonic

Voted "Most Likely to Get Pwned" 2010

• Members
• 70 posts
• LocationJackson,Michigan,United States
• Reputation:0

Posted 13 September 2010 - 04:18 AM

If i may say so,
This is quite sexy. No lie.

i agree
• 0

||| My Gallery ||| My photobucket |||
Most of my work is abstract?

### #9 n d

n d
• Members
• 124 posts
• Reputation:3

Posted 13 September 2010 - 12:38 PM

Nice. I'd love to peek at the source...
• 0

### #10 Boude

Boude
• Members
• 592 posts
• LocationThe Netherlands
• Reputation:1

Posted 13 September 2010 - 04:56 PM

Ok guys, thanks for your great response. I might add some functions this weekend, if I have nothing better to do. (Surprisingly I also have a life)

@n d: Source added, even some comments (lucky guy). I don't know how experienced you're with C#, so if you've any questions, feel free to ask.
I actually copied half my code from MadJik's codelab to indirectUI (somewhere in plugin development), so you might want to take a sneak peak there as well.
• 0

History repeats itself, because nobody was paying attention the first time.

• Members
• 111 posts
• LocationSomewhere in Denmark
• Reputation:0

Posted 13 September 2010 - 05:43 PM

You dont get the point correctly  i got a screenie bout it

this:

```double x = (tempPoint.First + 1) * bounds.Width / 2;
double y = (tempPoint.Second + 1) * bounds.Height / 2;
```

should be more like:

```double x = ((tempPoint.First + 1) * bounds.Width / 2) + bounds.Left;
double y = ((tempPoint.Second + 1) * bounds.Height / 2) + bounds.Top;
```

i think

Edited by Cookies, 16 September 2010 - 03:22 PM.

• 0

### #12 Boude

Boude
• Members
• 592 posts
• LocationThe Netherlands
• Reputation:1

Posted 13 September 2010 - 05:55 PM

@Cookies: Thanks for pointing that out. Will fix it on next update.

After some research and another mind destroying one hour trip in the tube, I came across something one might call a bug (no errors, don't worry). On next update distance from pixel in the "step loop" will affect how much they affect the colour of "current pixel". In plain common English, it will look better.

Also possible new icon (instead of blank bitmap) and I increase the possibility of updating this weekend (now assumption worthy).

Even more, when I'm explaining stuff the plugin does, I notice to use certain words to describe aspects of the plugin, some of these are now described in the main post (top of page 1).

Edit:
Forget weekend, updated now.
point now set correctly
added alpha multiplier, for less lossy alpha increase
better render method, old one still included, but no longer updated

Edited by Boude, 14 September 2010 - 04:09 PM.

• 0

History repeats itself, because nobody was paying attention the first time.

• Members
• 111 posts
• LocationSomewhere in Denmark
• Reputation:0

Posted 16 September 2010 - 03:29 PM

Thanks for the update
• 0

### #14 cjmcguinness

cjmcguinness
• Members
• 641 posts
• LocationDublin, Ireland.
• Reputation:1

Posted 05 October 2010 - 06:40 PM

Nice one: I remember making a request for someone to develop this type of plugin over 2 years ago
http://forums.getpai...est-motion-blur

This should be very useful.

Thanks.
-CJ
• 0

### #15 oma

oma

2012 Hit & Miss Award Winner

• Members
• 4,433 posts
• Reputation:13

Posted 05 October 2010 - 07:54 PM

classy plugin. thanks Boude!

ciao OMA
• 0

### #16 Boude

Boude
• Members
• 592 posts
• LocationThe Netherlands
• Reputation:1

Posted 06 October 2010 - 01:48 PM

Thanks guys, this plugin is only a logical "spin-off" of zoom blur. So requests are logical, I can remember at least one other (negative zoom blur).

@cj: This plugin is pretty much exactly what you asked for, so great minds think the same.

While thinking about this, I had this idea: what if the plugin would blur in perspective (like atmospheric perspective, objects (read: "pixels") close to the vanishing point are blurred more then objects further away, of course this would be optional. So what do you think?
• 0

History repeats itself, because nobody was paying attention the first time.

### #17 oma

oma

2012 Hit & Miss Award Winner

• Members
• 4,433 posts
• Reputation:13

Posted 06 October 2010 - 03:02 PM

certainly would an interesting take on this already great plugin. would look forward to seeing how that version turns out. LOL!

ciao OMA
• 0

### #18 j.d.melek

j.d.melek
• Members
• 276 posts
• Locationturn left at boston and continue straight ahead for approx. 3000 miles.
• Reputation:0

Posted 06 October 2010 - 05:23 PM

certainly would an interesting take on this already great plugin. would look forward to seeing how that version turns out. LOL!

ciao OMA

thanks for the great plugin Boude..
great to see you back Oma..have admired your work immensely..albeit from afar..hope to see more from you soon..

regards j.d.
• 0

### #19 RedFalcon

RedFalcon
• Members
• 43 posts
• Reputation:0

Posted 06 October 2010 - 06:58 PM

very good plugin. Useful! Many thanks!
• 0

### #20 Boude

Boude
• Members
• 592 posts
• LocationThe Netherlands
• Reputation:1

Posted 12 October 2010 - 06:16 PM

After some messing around with my code, I found that a perspective blur wasn't possible (not without a huge workaround). The result isn't as good as you might expect. So you'll have to do with the current version.
• 0

History repeats itself, because nobody was paying attention the first time.