BGE Post-Processing Addon

UPDATE!

Features: +2 filters (HDR, Motion Blur) and some UI fixes.

Download v1.4

Version 1.4 has been released:

Enjoy! :smiley:

HDR is awesome! I dont know why but motion blur is not working, i cant even add it with the add on
That, the Chromatic Aberration is working at 2.78? I tried a couple of time and i cant get it in the game

Add motion blur filter
select the text editor
choose ‘mblur.glsl’
replace this line:
uniform float distance = 0.2; //‘the distance of the blur’

with:
float distance = 0.2; //‘the distance of the blur’

Downside: you will have to change the value in the script to change blur amount instead of being able to change the property.

Nice! Thank you so much for this! These filters work perfectly in Blender 2.77, and I’ve already managed to make some pretty cool stuff with them, plus it’s really fun playing with the values! :cool:

ok, so I’m having this wierd problem, I installed the addon in UPBGE v 0.1.0, but although there’s a Post-Processing-filters section in game engine render panel, it doesn’t show any buttons (like te one used to select the filters) so I cant make it work in UPBGE. can this be fixed? I mean, filters work in UPBGE when I add a filter to a camera then append it to UPBGE, so it should only be the addon’s problem. Hope this will get fixed in newer releases, it’s not that an important problem :v
But anyways, nice work! and it’d be cool if you could implement a Lens Flare filter like these people here> https://blenderartists.org/forum/showthread.php?398236-Lens-Flare-2D-Filter (although I dont know why their blend doesnt work :stuck_out_tongue: )

Great, its nice to hear that people find them useful :D!

Why are you appending to UPBGE? Why not just add it while in UPBGE?
Are there any errors, what does the panel without buttons look like?

Worst case scenario: They are all just scripts so you can easily copy them across with an always–and–2d filter (except for HDR and motion blur which have more than 1 script).

Regarding lens flares, I actually originally contacted youle with the shadertoy example of this, then adriansnetlis polished it up so it looks nice. The problem was that the author of the original lens flare does not want people using it commercially, so I would rather avoid adding it to the addon otherwise people may use it for this purpose.

This still looks good, if someone can port it: http://www.3dcpptutorials.sk/index.php?id=7 -​ Sun rays, lens flare, halo. The author gave permission.

@Akira_San
This still looks good, if someone can port it: http://www.3dcpptutorials.sk/index.php?id=7 -​ Sun rays, lens flare, halo. The author gave permission.

well, that’s good then, right? can that be added?

@Thatimster
Why are you appending to UPBGE? Why not just add it while in UPBGE?
Are there any errors, what does the panel without buttons look like?

well, its like this:

The top of the page says not for commercial use?

It requires you to have 1 selected object only and the selected object to be of type ‘CAMERA’.

The top of the page says not for commercial use?

No the author made a reply by editing my comment - “Edit: Admin: Yes, you can, but add a reference to this page of this web.”

actually, the full picture is this:


Go to window > toggle system console and screenshot what it says.

UPDATE:

V1.5 of the addon has been released:

Features:
-UPBGE compatibility
-Dynamic scaling for Bloom Filter
-New chromatic aberration filter (with dynamic scaling)
-Fixed errors when removing scripts

I have noticed several instances of poor coding in your script.

  • you use ‘filter’ as a variable. You should avoid that because it is a built-in function.
  • you have a block of code that checks the same thing, twice. It is redundant;
    for i in bpy.context.scene.objects:
        if i.name in bpy.context.scene.objects:
  • you use ’ ’ on strings and characters alike. Not bad but you should use " " more often.

Thanks for the heads up! Yes that’s true using filter is probably not a good idea to use as a variable I will change it.
The redundant check must have been a victim of copy and pasting from the camera checks, I will fix this too.

Regarding strings, python interprets both double and single quotes the same so I usually prefer to remain consistent (and also pressing the shift key less often). Although it is good practice to use double quotes so that the code is a bit more universal in regards to C programming.
For this filter I will probably leave the strings the same.

Thanks for the feedback!

No problem. If you ever need help, just ask me.

Fixed all issues mentioned and updated version in the addon description (which I forgot to do last time).
Updated: v1.5

How about an underwater filter, I really could use one of those.With setting for blur and waviness, and color darkening and fading as objects are farther away form the camera. Is there any filter like that?

@Thatimster Hi,when I remove hdr shader,blender show this message to me


Maybe new update?