A weapon effect glow. It never worked out, when i tried the upbge last year.
I wrote it… you have to know how to use it.
you need a bloom buffer (in render tab / attachments add 1 ‘custom’ )
you need the scripts attached to the scene(in camera typically)
and you need the objects to use attachments
I mean, when I tried this upbge it didn’t work with my blend files. Nice work though.
yeah, nice work!
i modified it from the ‘Bloom2.blend’ in the first post so it works in some older versions
that does not have render attachments branch(0.2.4).
the file i uploaded don’t need the objects to use attachments. With hdr enabled pixel with energy higher than 1.0 (white) naturally blooms, just like eevee.
To port your projects to Upbge you may have to adapt the files and scripts.
To implement this specific shader, you need to import the modules and define the logic bricks exactly as they are in the original, even their names.
buffer_bloom_temporal_4b.blend (917.1 KB)
someone informed my my test file is not working for them - here is a update
edit - the upload was bugging
it didn’t work for me either in the past when i was using 0.2.4 branch with no attachments.
But this changed when i updated to 0.2.5. So may be the version their using.
Now, i can’t download your update.
@Murilo_Hilas - fixed I think -
WOW! This is pretty cool. amazing. Thank you.
the gravitational lensing / distortion effect is awesome!!!
ok - I just looked this over - what we can do - is any object whose bloom attachment buffer is not zero for that frame- we can clip that object in over the final result - yielding glow but not emit as a buffer
I have not applied it here yet
The HDR pipeline is enough for the basic bloom. With hdr enabled pixels with energy higher than 1.0 (white) naturally blooms, just like eevee.
the user can them use attachments only to customize the final result. (optional)
this is a general-purpose multi-estaged color-bleeding shader
that works in many scenarios and lighting conditions.
for now we can:
- control what glows - high-energy pixels naturally blooms
- make it overcast, heaven-like, fantasy scenarios (everything blooms)
- temporal variables. yields trails from fast moving blooming objects (‘streaks’)
we will need render attachments to do the following:
- control how the shader reacts to specific objects
- ‘glow behind’ - make outline glow (to highlight individual objects)
- make some blooming moving objects yield trails but others not to.
The problem quoted above was solved here and temporal averaging was added. You can now control if it flickers, have trail effect or something in between. Enjoy: hdr_motion_bloom.blend (128.6 KB)
This is amazing, really fun to see it in realtime, great work!
soon i’ll try to make it more physically correct and do render attachments enhancements.
That would be great. Im trying to apply this to a scene of mine. So I add the custom filters to my camera as actuators, set a material to emissive, is there anything else?
you have to append the script ‘shader.py’.
set the python controller to module and type in the controller: shader.run
name the 2dfilter actuators as ‘BufferA’ and ‘Image’.
turn on HDR HALF in render tab under System.
or you can use with HDR NONE, but them you have to adjust the variables ‘intensity’ and ‘power’ to act as a threshold to the brighter values.
let me know if you got it.
I am trying to imitate eevee bloom in the 2.5.0
without using render attachments.
my attempt to TheFinalBloom.blend (96.6 KB)
This works great in 0.2.5!
How to change the colorRange value in runtime?
I see that line 9 has a # at start.
I don’t know much of glsl language.
in glsl the hash symbol is not a comment.
set a uniform float in the shader.py script
and make colorRange as that uniform in the image.fs script
setUniform1f ( name , fx )
Parameters: * name ( string ) – the uniform name
- fx ( float ) – Uniform value