picture home | art | events | music | rack extensions | downloads | pixel blog

omino pixel blog

pixels, motion, and scripting
david van brink // Mon 2010.05.3 17:54 // {after effects pixel bender}

AE: Omino Staragon, A Pixel Bender Filter

download: ==> omino staragon 32 <== a pixel bender filter Just recently, Dale Bradshaw posted a rounded-rect pixel bender plugin. Pretty nifty!

It got me thinking, What about other rounded-corner polygons? It was a bit of a puzzle. As with all Pixel Bender plugins, the question is, What color is this pixel? How does a given pixel know if it’s inside a rounded-corner pentagon or not?

hex_and_star.png

I stuck to regular and stellated polygons to start. One solution goes like so:

  • Divide the plane into pie-slices, one for each edge of the polygon.
  • For each point, decide which slice you’re in.
  • Decide if you’re inside or outside the edge.
  • For the rounding… decide which corner you’re nearest
  • Are you in the arc of that corner? If so, decide if you’re inside the rounding-radius.

pentagon_pie.jpg

Well, that was a bit of obsessive fun. Here’s a screen shot, including the parameter controls:

And here’s a little demo of it.

download: ==> omino staragon 32 <== a pixel bender filter

Comments are closed.

0.0152s
(c) 2003-2023 omino.com / contact poly@omino.com