Starling Filter Collection

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.

7 Comments »

  1. Dan Zen says:

    Hey – thanks a lot – great filters!

  2. TANG says:

    COOL!

  3. bobo says:

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

  4. Devon O. says:

    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

  5. babeuf says:

    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!

  6. Santanu says:

    A big Thank You Devon! For sharing the filters! Thanks!

RSS feed for comments on this post. / TrackBack URI

Leave a Reply

Devon O. Wolfgang

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development”

Contributing Author of “Flash AS3 for Interactive Agencies”

Senior Software Engineer at Meez

Starling Particle Editor

vignette

Some Photographic Shaders


A couple weeks ago I was contacted and asked to develop some filters for Starling that could be used in a mobile camera app[…]

boids

Animated Particles, Books, and Code – It’s a New Year


It’s a new year[…]

bug

Logical Or Assignment Bug in ASC2


So, here’s something to keep an eye on if switching to AIR 3.8[…]

Starling Filter Collection

Starling Filter Collection


Building up a collection of filters for the Starling framework[…]

Starling Warp

Warp Filter for Starling


Another filter for the Starling framework[…]

promise

Promises Promises


What it boils down to is handling asynchronous tasks […] in a clean, intelligent fashion […]

GodRays

Starling ‘God Ray’ Filter


While cruising the internet today looking for interesting things to try out I ran across this fun little GPU Gem[…]

Alpha in Starling Filters and Basic Branching in AGAL


In plain English to create a circular mask we would want to do something like this[…]

Starling, Nape Physics, and PhysicsEditor


A look at using the PhysicsEditor tool for Nape and Starling […]

Playing With a Couple Game Ideas


Just a couple game fragments, really[…]

One More Filter For Starling


Another filter for the Starling framework[…]

Filters in Starling


Using and writing filters in the Starling framework[…]

Towards a Better Scratch


Perhaps it was too much Meat Beat Manifesto in the late 80’s […]

Learning AGAL with AGALMacroAssembler and OpenGL Examples

So the other day I sat down and thought to myself: self, it’s high time you learn you some of this new fancy pants AGAL[…]

UV Scrolling in Starling


Obviously this could come in pretty darned handy for space games, side scrollers, etc, etc[…]

Drawing on Stuff in Away3D 4.0

So, Easter Day, I thought I’d sit down and make a little ‘Paint on an Egg and Send it to Your Friend’ app.