Jump to content


Photo

Point Blur Effect


  • Please log in to reply
21 replies to this topic

#1 Boude

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

Posted 12 September 2010 - 10:00 AM

Posted Image
Attached File  PointBlur.zip   4.07K   2808 downloads
Latest version: 1.4.9

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.

Posted Image
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. :)

Posted Image


#3 barbieq25

barbieq25
  • Members
  • 4,299 posts
  • LocationQueensland, Australia
  • Reputation:114

Posted 12 September 2010 - 12:13 PM

I like this idea. Many thanks!

Sig2.png


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! :coffee:

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.

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

#6 Goonfella

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

Posted 12 September 2010 - 04:44 PM

Nice plug in Boude. Works a treat. ;)

Goonfella3D_zps67f49b6b.jpg


#7 Mayor_McSteeze

Mayor_McSteeze
  • Members
  • 563 posts
  • LocationColorado!
  • Reputation:2

Posted 13 September 2010 - 03:43 AM

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

#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
Posted Image
||| My Gallery ||| My photobucket |||
Most of my work is abstract?

#9 n d

n d
  • Members
  • 124 posts
  • Reputation:2

Posted 13 September 2010 - 12:38 PM

Nice. I'd love to peek at the source...
Posted Image

#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.
Posted Image
History repeats itself, because nobody was paying attention the first time.

#11 Cookies

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

Posted 13 September 2010 - 05:43 PM

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

http://cookies.dcsrvdls.com/images/screenie.jpg
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.

Posted Image


#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.
Updates:
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.

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

#13 Cookies

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

Posted 16 September 2010 - 03:29 PM

Thanks for the update :D

Posted Image


#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
Posted Image
Posted ImagePosted ImagePosted ImagePosted Image

#15 oma

oma

    2012 Hit & Miss Award Winner

  • Members
  • 4,432 posts
  • Reputation:12

Posted 05 October 2010 - 07:54 PM

classy plugin. thanks Boude!

ciao OMA

#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?
Posted Image
History repeats itself, because nobody was paying attention the first time.

#17 oma

oma

    2012 Hit & Miss Award Winner

  • Members
  • 4,432 posts
  • Reputation:12

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

#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.. B)

regards j.d.

Posted Image


#19 RedFalcon

RedFalcon
  • Members
  • 43 posts
  • Reputation:0

Posted 06 October 2010 - 06:58 PM

very good plugin. Useful! Many thanks!

#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.
Posted Image
History repeats itself, because nobody was paying attention the first time.