Blender 2d Filters

After looking at UDK's post prepossessing chain in the last post I remembered that blender had something similar but I had never properly used it before. I remember mabie using it ounce to invert the screen colors when a player died or something cheesy like that.

Yesterday i took another look at the 2d filter option and noticed that there was a coustom 2d filter option. I googled it and turns out it looks for a post proses glsl shader. Has to be hand coded unlike the visual editor in udk. I looked of example code but couldn't find any and tried some GLSL scripts but couldn't get them to work. 

I tryed messing around with the pre built shaders in blender(Sadly didnt find a way to look at the code for the built in filters). My goal was to find an edge detection shader whitch would draw outlines whilst i was searching online. I realised that the buit in sobil filter gave the objects a white outline but messed aboutout the rest of the colors and made the bg black. So I also applyed the desatureate filter and finaly the inverse color filter. This made a black and white image with a black outline. 



This proved that an outline could be achived and i just had to look harder. 


So I Googled some  more today and found a few useful places for shaders. Only some of them work on my ATI graphics card though. 

Found this awsome wave filter video and through following links and stuff found some more:

Found this guy who has 3 basic 2d opengl filter tutorials for blender on his blog, useful stuff:

I looked up how some filtes worked in other 2d packages heres gimps dilate filter explained:
To sum up what i learned from that page. The filter looks at everypixel on screen space ounce the inital game render frame has taken place then it analises each pixel and performes n action upon it depending on its sarounding pixels. In this example it uses a 3x3 grid

Here is a comparison between the original image and the filtered one.


Then i keped finding more there was a page which had some a couple links that lead to loads of nice filters. Here are soem of them(Most of them are by martinsh thanx these are awsome):





Another example of screenspace Ambient Occlusion but it looks like a sketch ish.

Depth of field:




And this Awsome watter shader:




And finaly the last thign i found was an old post on blender artist containing the code i needed to produce an outline around objects.(And it seemed like th simplist pice of cade i found)



Comments

Popular Posts