PostFX Library
by Andy J Edmonds · 09/06/2011 (9:54 am) · 19 comments
A couple of weeks ago I set about learning how to create and add new post effects to our game. This quickly grew into a postFX library which I decided I would post as a resource - everybody loves Post Effects, right? :)
Installation is simple. Download and unzip this file into your game folder (it should drop straight in).
There are just a couple of small additions to existing files:
In Scripts/client/init.cs -- after exec("art/gui/StartupGui.gui");
In Scripts/client/default.bind.cs -- at end of file:
So what effects have we got then?

Anticipating the inevitable "video else it didn't happen" comment (Steve...) I made this:
I can't take credit for writing most of these from scratch - they are mostly a collection of effects that have been ported from glsl shaders found elsewhere on the internet (publicly available). They are all easily tweakable / extendible and hopefully you will use them as a starting point (the night vision shader, for example, definitely needs a bit of work).
Usage
Press alt-m in-game to bring up the control GUI. The effects can of course be controlled via script - just see PFX_Library.cs for the PostEffect names as well as the variables to control the look of them.
Installation is simple. Download and unzip this file into your game folder (it should drop straight in).
There are just a couple of small additions to existing files:
In Scripts/client/init.cs -- after exec("art/gui/StartupGui.gui");
exec("art/gui/guiPostFX.gui");In Scripts/client/default.bind.cs -- at end of file:
// postFX Gui
function postFXGuiToggle(%val)
{
if (%val)
{
if (guiPostFX.isAwake())
{
Canvas.popDialog(guiPostFX);
}
else
{
Canvas.pushDialog(guiPostFX);
}
}
}
moveMap.bind( keyboard, "alt m", postFXGuiToggle ); // replace with keystroke of your choosingSo what effects have we got then?

- Pixelation
- Blurred Vision
- Dream View
- Cross Stitch
- Posterisation
- Night Vision
- Chromatic Aberration
- RGB sliders
- Zoom Blur (credit to Tuomas Kaukoranta for this one)
- Negative
- Black and White
- Monochrome
- Edge Detection
Anticipating the inevitable "video else it didn't happen" comment (Steve...) I made this:
I can't take credit for writing most of these from scratch - they are mostly a collection of effects that have been ported from glsl shaders found elsewhere on the internet (publicly available). They are all easily tweakable / extendible and hopefully you will use them as a starting point (the night vision shader, for example, definitely needs a bit of work).
Usage
Press alt-m in-game to bring up the control GUI. The effects can of course be controlled via script - just see PFX_Library.cs for the PostEffect names as well as the variables to control the look of them.
About the author
Formed in 2005, EiKON Games is an indie games development project based in the UK working on the tactical first person shooter "Epoch: Incursion". See the Join Us or Contact Us pages at http://www.eikon-games.com/
#2
09/06/2011 (12:12 pm)
Cool shaders, ty Andy. Zoom Blur would be a nice add for a teleporter.
#3
Nice done :)
09/06/2011 (12:59 pm)
Hey, absolutely cool! Hope this find its way into the official source!Nice done :)
#4
09/06/2011 (1:49 pm)
Cool stuff - and it's always great to see a video example of what a resource does.
#6
09/06/2011 (3:44 pm)
Blue ribbon job. Thank you for the video.
#7
09/06/2011 (9:56 pm)
So pretty....
#8
09/07/2011 (5:01 am)
Thats great thanks :-)
#9
09/09/2011 (8:35 am)
Thanks!
#10
09/09/2011 (12:19 pm)
Nice post!
#11
09/09/2011 (12:30 pm)
loving the night vision, pixelation, and Chromatic Aberration. create some sweet cell shaded models and use the pixelation mode to create some 3D nostalgia
#12
@Jonathan - I'm a fan of the pixelation one myself. 8-bit memories :)
09/09/2011 (1:39 pm)
Thanks for the comments, all!@Jonathan - I'm a fan of the pixelation one myself. 8-bit memories :)
#13
Nice resource :). Chromatic aberration looks really cool... I'm racking my brain trying to figure out how to fit it into my game ;P.
09/09/2011 (5:41 pm)
Whoah... if you scroll up and down really fast the speed blur FX looks like it's moving.Nice resource :). Chromatic aberration looks really cool... I'm racking my brain trying to figure out how to fit it into my game ;P.
#14
09/11/2011 (5:44 am)
Nice work Andy. Thanks for sharing.
#15
Want to have infrared, thermal, crystal ball side effect
like UBI_GOUST2
09/13/2011 (2:22 am)
@ANDY Want to have infrared, thermal, crystal ball side effect
like UBI_GOUST2
#16
If / when I ever do get round to it, I'll be sure to share!
09/13/2011 (2:25 am)
Infrared and thermal are quite easy to fake using an alternative colour spectrum. I've often wondered about writing a 'heat' attribute into materials in order to make 'real' thermal vision but it's not a high priority for me at the moment.If / when I ever do get round to it, I'll be sure to share!
#17
10/11/2011 (2:11 pm)
very cool, works perfectly out of box. nice job. lovin the dreamview and nightvision filters.
#18
01/23/2014 (11:46 pm)
Great effects...
#19
11/08/2014 (9:28 pm)
@Andy I know this is late from when you posted this but I wanted to make sure that you understand how amazing all of this is. I just implemented this, and I now realize that there are so many things here that will help with my project. Thank you so much for taking the time to post this amazing resource. Take Care 
Torque 3D Owner Tuomas Kaukoranta
Not to mention the zoom blur, effect of the year!