LogoLogo
  • Home
  • Projects
  • About
  • Contact

Starling Filter Collection

Devon O. · July 05, 2013 · Actionscript, Shaders · 9 comments
27

I mentioned this earlier, but it was really just a footnote at the bottom of a previous post, so it may have been easily overlooked. In any case, I’ve set up a Github repo containing a collection of filters for the Starling framework I’ve written (or ported as the case may be) which may be used for personal or professional projects. Of course, if you’re not a fan of Starling or are using another Stage3D framework, you could always just grab the AGAL from these and use it elsewhere.

At the the moment, the collection contains these items:

Warp Filter:

does bezier curve warping on the left and right edges of the display object being filtered. Could be animated to produce a Mac ‘genie’ style effect.

example

God Rays Filter:

creates a god rays or fake volumetric lighting effect on the filtered display object. Not compatible with Context3DProfile.BASELINE_CONSTRAINED mode.

example

Two Spotlight Filters:

The first is an oldie that has a decent flicker effect

example

The thing I disliked most about the original version though, is that on rectangular textures, the effect will be oval shaped (stretched by the texture itself). The new version (Spotlight2Filter.as) remains round on any texture and also allows you to adjust the color of the light. No flicker though.

example

Motion Blur Filter:

creates a motion blur effect at a specified angle. Mixed feelings about this one, but it may be useful. It’s not compatible with Context3DProfile.BASELINE_CONSTRAINED mode, though.

example

Sine Wave Filter:

warps an image in a sine wave fashion. Set to extremes this can be used as a ‘bad tv’ effect. There’s a ticker parameter that lets you animate the effect without adjusting any other settings. There’s also a ‘isHorizontal’ boolean property. Setting this to false will create more of a weird distortion effect rather than a wave effect. Just check out the

example

Chroma Key Filter:

standard color key kind of thing. Could use some edge softening, but what do you want for free?

example

Newsprint Filter:

this one produces an interesting sort of black and white half tone effect like newsprint. Not sure how useful it really is, but it’s one of my personal faves.

example

Glass Filter:

tiled glass like distortion effect

example

Hex Filter:

a pixelate effect that creates hex shaped pixels. Oddly enough, this doesn’t seem to work properly in some Flash players (Chrome’s ‘Pepperflash’ for sure, but others seem not to work as well. Go figure). It’s also not compatible with Context3DProfile.BASELINE_CONSTRAINED mode. It’s a pretty cool effect, but use it at your own risk – some viewers may not see what you expect.

example

Scratched Film Filter:

creates a subtly sepia toned (more black and white, actually) effect with animated scratches. The jury’s still out on this one, really, and I almost didn’t include it. But then I thought, this would make a cool effect on a horror game’s splash page. I don’t know – it may be useful.

example

Flashlight Filter:

this is my personal favorite and I think it could be useful in a huge number of games. It creates a ‘light cone’  effect with a large number of adjustable parameters (including light color). You can actually do a full 360 degree sweep and use it as a 3rd spotlight option, if you were so inclined. Only downside is that it isn’t compatible with Context3DProfile.BASELINE_CONSTRAINED mode.

example

[UPDATE 25AUG2013]

Here’s a few more:

Scanline Filter:

straight forward enough scanline effect

example

Line Glitch Filter:

interesting effect that slices an image up and sends the slices in alternating and opposite directions

example

Posterize Filter:

produces a posterization/color banding effect.

example

Crosshatch Filter:

produces a very nice pen and ink crosshatch effect. A word of warning though: this will only work with square textures that have a power of two width/height.

example

I’ll try to remember to update this post if I add any more.

If you use any of these and have problems, post a comment here or submit an issue on Github and I’ll promptly ignore it until I have some free time some day. And if you use any of these and don’t have problems, share a link – it would be interesting to see what people come up with.

If you have any filters of your own you’d like to see included, let me know and maybe I’ll add it in or make you contributor on Github. It’d be nice to build up a large definitive collection.

  Facebook   Pinterest   Twitter   Google+
agalstarling
  • Droste / Escher Effect in AGAL
    December 31, 2015 · 0 comments
    5352
    50
    Read more
  • Santabot: A Unity3D Flash Game
    December 26, 2011 · 4 comments
    2711
    13
    Read more
  • Loading, Filtering, and Saving Images with Flash Player 10
    June 16, 2008 · 3 comments
    3221
    1
    Read more
9 Comments:
  1. Hey – thanks a lot – great filters!

    Dan Zen · July 17, 2013
  2. COOL!

    TANG · July 30, 2013
  3. hi, devon
    i didnt find the source code for “Flashlight Filter”, would you pls tell me where to find it.
    thanks

    bobo · September 12, 2013
  4. Hey bobo,

    All the examples above are in the Github repo linked to in the first paragraph. The one you’re looking for specifically, though, is here: https://github.com/devon-o/Starling-Filters/blob/master/src/starling/filters/FlashlightFilter.as

    Devon O. · September 12, 2013
  5. Very cool!

    I grabbed them all and use your template to build my own (easier) one:

    http://www.babeuf.net/starling-old-school-text-effect/

    So thanks for sharing this!

    babeuf · April 07, 2014
  6. A big Thank You Devon! For sharing the filters! Thanks!

    Santanu · September 16, 2014
  7. hi, I found the flashlight filter particularly interesting, I was wondering if it’s possible to use it in a scenario with multiple light sources in one pass. currently as far as I can see the filter removes everything outside the cone, and it would be awesome if there is a way to still keep the directional light information for example for pixels/vertices outside the cone. Thanks!

    ionut.pusca · January 16, 2015
  8. Hi,

    I was trying to use your chroma filter but I always end up with a blank image.

    _overlayImage.filter = new ChromakeyFilter(0x00ff00, 0.3);

    If I remove the filter, I can see the image.

    Jeds · July 28, 2015

Leave a Comment! Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Devon O. Wolfgang

AIR | Unity3D | AR/VR

Unity Certified Developer

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development” and “Starling Game Development Essentials”

Reviewer of “The Starling Handbook”

Unity Engineer at Touch Press.

Categories
  • Actionscript (95)
  • AIR (16)
  • Flash (99)
  • Games (7)
  • Liberty (13)
  • Life (53)
  • Shaders (20)
  • Unity3D (21)
Recent Comments
  • MainDepth on Unity Ripple or Shock Wave Effect
  • Devon O. on Unity Ripple or Shock Wave Effect
  • Feral_Pug on Unity Ripple or Shock Wave Effect
  • bavvireal on Unity3D Endless Runner Part I – Curved Worlds
  • Danielius Vargonas on Custom Post Processing with the LWRP
Archives
  • December 2020 (1)
  • December 2019 (1)
  • September 2019 (1)
  • February 2019 (2)
  • December 2018 (1)
  • July 2018 (1)
  • June 2018 (1)
  • May 2018 (2)
  • January 2018 (1)
  • December 2017 (2)
  • October 2017 (1)
  • September 2017 (2)
  • January 2017 (1)
  • July 2016 (1)
  • December 2015 (2)
  • March 2015 (1)
  • September 2014 (1)
  • January 2014 (1)
  • August 2013 (1)
  • July 2013 (1)
  • May 2013 (1)
  • March 2013 (2)
  • December 2012 (1)
  • November 2012 (1)
  • September 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (1)
  • December 2011 (2)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (1)
  • May 2011 (2)
  • April 2011 (2)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (3)
  • October 2010 (5)
  • September 2010 (1)
  • July 2010 (2)
  • May 2010 (5)
  • April 2010 (2)
  • March 2010 (7)
  • February 2010 (5)
  • January 2010 (5)
  • December 2009 (3)
  • November 2009 (1)
  • October 2009 (5)
  • September 2009 (5)
  • August 2009 (1)
  • July 2009 (1)
  • June 2009 (2)
  • May 2009 (6)
  • April 2009 (4)
  • March 2009 (2)
  • February 2009 (4)
  • January 2009 (1)
  • December 2008 (5)
  • November 2008 (2)
  • September 2008 (1)
  • August 2008 (6)
  • July 2008 (6)
  • June 2008 (9)
  • May 2008 (4)
  • April 2008 (3)
  • March 2008 (4)
  • February 2008 (9)
  • January 2008 (7)
  • December 2007 (6)
Copyright © 2021 Devon O. Wolfgang