bloom filter for 2.6a

So i tried using Goran’s script from his tutorial but i couldnt make out what it said on screen so ive bin looking but cant find any scripts or filters that will work for 2.6a

Why wouldn’t they work if they did in 2.5?
What does the Console say?
(Aside that, a Bloom is just a additive Blur – so if you have any Kind of a Blur Script, then you have the Base for a Bloom Filter.)

How about this one I once made for myself. It is simplified so that it looks not quite as smooth as it could, in Order to be faster.

uniform sampler2D bgl_RenderedTexture;
void main()
{
 vec4 sum = vec4(0);
 vec2 texcoord = vec2(gl_TexCoord[0]).st;
 int j;
 int i;
 int b=2;
 
 for( i= -b ;i < b; i++)
 {
  for (j = -b; j < b; j++)
  {
   sum += texture2D(bgl_RenderedTexture, texcoord + vec2(j, i)*0.002) * 0.7;           
  }
 }
 
 gl_FragColor = sum*sum*0.0042+(texture2D(bgl_RenderedTexture, texcoord)/1.5);
 gl_FragColor.a = 1.0;
}


It works because I just played around with it in 2.6
Did you set a Always sensor -> and -> 2d filter custom script?

idk it just did nothing but ill try your scrit and Chishado ya i did but idk hopefully C.A’s script will work.

So i tried you script with with an allways sensor and and a custom 2d filter pointing to the script witch i named bloom.py but still nothing happens.

Could it be that my graphics card doesnt support bloom or anything like that?

but shadows and everything else GLSL works so.

First of all, the Ending .py is wrong and therefore unnecessary, a Waste of Space. But even with it, the Filter should work.

That would have to be a ridiculously old Graphics Card. Have you changed together with your Blender Version? Or haven’t you ever got any 2D-Filters to work ever before with 2.5x?
In Fact, I really would disbelieve that it could be the Graphics Card.
And it would be extraordinarily ridiculous if the Graphics Card could not handle Bloom but other Filters.
Do the built-in Filters work for you? Those already given by Blender, do they work?

And, like always: Does the Console say anything important?

ya the console does say something like an error or something here is a screenshot

and ya all the other filters work and ya your right i doubt it is the graphics card well its a onboard graphics on a lenovo think pad from 2009 so its not that old.

Attachments


I don’t know about the lower Half of that Screenshot, but the upper Half looks like you have forgotten the last }-Bracket.

i just copied and pasted what you had

But your Console says »pre-mature EOF« and as I replicated it, it appeared for me when I deleted the last }-Bracket. (And when one copy-pastes something, it can happen that a tiny Bit might accidently not have been selected durin’ the Process.)

The real mystery, anyway, is the lower Half of your Screenshot, which doesn’t ring any Bell for me.

aw your right i tried replacing it at the end of the last sentance maybe to see if that was what you ment but its down below that.

@C.A. Try putting the script up on paste-all. It’s a nice method to keep everything together and in order.

Yes it worked! thanks but i dont think ill be using it for swap because doesnt really look good with a bunce of squares and such but still ill use it on other projects. again thanks so much for your help:D

Uhm, wait. So you wanted a Bloom for SWAP? You have picked it up again?
And did you mean that my particular Filter doesn’t match the Visuals or Bloom in general? Because the here given Filter can easily be modified. I once edited the Version that I have here on the Thread so that there is an additional Integer to adjust the Amount of Samples used, and there is a Value somewhere to adjust how far apart the Samples are, how far the Blur reaches.

EDIT: Be aware: My Version with just 2 Samples does not look good on Geometry with just plain Material Colors. It looks better when you have some proper Details in your Visuals.

Well kinda im just working on it well i do the other game witch is almost finished and the bloom filter slows SWAP down alot! down to 8 frames per second so i probaly wont use it for that project anyways.

8 Frames per Second, for the second most simple Filter one could think of? The Amount of Detail in your Level should not affect it either.
So, a very basic Question: When you use a 2D-Filter, then what does your Sensor look like? Because if you use a pulsed Sensor, with True-Level-Triggering activated, then it would not surprise me at all that they slow your Games down so much. A 2D-Filter must never be set with a pulsed Sensor, never! So, could it be you have done that?

Yeah, C.A.'s right - it only needs to be applied once.

Yep haha thats what it was but still it drops down to 30 frames per second also here is a screenshot to so you why i doesnt look good for my game.

Attachments


Looks blurry more than bloom-like. Is it the filter that’s dropping the FPS, or the massive amount of cubes in the scene? If you don’t need to interact with the cubes, you might want to invest in writing a script that swaps out the cubes for just individual faces.

EDIT: Or just join all the non-interactable cubes together into a single mesh to help speed things up, too.

no its the filter cause its around 45 without it and ya i actually awhile back swtiched to just planes with bevels and all the black ones are joined together and ya idk why it looks like that.