2dfilter

Better Bloom Filter w/ Down Sampling & Lens Flares By kitebizelt

You already know about the common bloom 2DFilter for the blender game engine (if not, check out this post), and the main difference with this version of kitebizelt is that only the objects with saturated colors are going to be affected by the bloom effect.

Here is the author description:

We all know bloom is a filter that makes some area/objects looks more glowy, and BGE already got that, but here comes some problem:

  • The bloom filter on BGE sometimes blooms objects/areas where do we dont want
  • Really FPS consumtive

So I thought why not make a better bloom filter?
Pros:

  • Less FPS consumtive
  • Selective Bloom

Cons:

  • Some artifacts on non-bloom objects
  • I don’t know why but its 1 frame behind… bge.logic.NextFrame() doesn’t work

So, once I get the demo file I tested it on a demo level of mine, and there is the result:

I really liked, but it has some troubles with lamps/shadows, maybe my mistake don’t know, but it worth the try.

Here is the post in BlenderArtist

I’ve made a copy of the files, you can get it here or in the BA post mentioned above.

BetterBloomFilter_Flares

BletterBloomFilter

Heat 2D Vision

From the author Smoking_mirror in BlenderArtist:

“It’s not real heat vision, you have to add a lamp to illuminate the scene when you turn it on if the scene is dark, but it simulates the heat map style coloration of thermographic vision. You can combine it with other filters such as noise or blur to get a more interesting effect. I tried using depthTexture to get a true “seeing in the dark” type filter but the depth texture doesn’t pick up textures, transparent objects etc… so it wasn’t a good effect.”

Predatos Style View

here’s the GLSL code:

uniform sampler2D bgl_RenderedTexture;

const float vignette_size = 0.4;
const float tolerance = 0.2;


void main(void)
{           
    vec4 col_value = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
    
    float col_avg = (col_value[0] + col_value[1] + col_value[2]) * 0.333;
                            
    float ratio = 2.0 * col_avg;
    float b = max(0.0, (1.0 - ratio));
    float r = max(0.0, (ratio - 1.0));
    float g = 1.0 - r - b;
 
    vec4 color_vision = vec4(r,g,b,1.0);
 
    vec2 deltaTexCoord = gl_TexCoord[0].st - vec2(0.5);
    vec2 powers = pow(deltaTexCoord,2.0);   
        
    float radiusSqrd = pow(vignette_size,2.0);    
    float gradient = smoothstep(radiusSqrd-tolerance, radiusSqrd+tolerance, powers.x+powers.y*0.3);

    gl_FragColor = mix(color_vision, vec4(1.0,0.0,0.0,1.0), gradient);
    gl_FragColor.a = 1.0;
    

}

Old game project video

I’ve used some 2dFilters, (bloom, glow, etc) but when I was searching for more, I found in blenderartist forums an interesting filter, the author (I can’t recall the name right now, sorry man!) called it “Cheap Normal Effect“, and I liked the fact that I provides with some kind of toon/stroke effect. If you want to try it, check the link here, and attach it to a custom 2dFilter sensor.

s4nro3

This is a old game project video, just found the video in my screen capture folder and decided to do some editing just for fun.

The entire level is a “proxy” model, the final one was intended to be more detailed, so this one was for testing purposes.