RadialBlurFilter,FadeFilter & ColorOverlayFilter

I was just messing around different examples and found TestPostFilters.java and Yey, here I found RadialBlurFilter,FadeFilter & ColorOverlayFilter.



Here RadialBlur and Fade will come in very handy, but why they are not in the Effect documentation? Feels like, they are hidden features :stuck_out_tongue:



Is it possible to take it as an request, to use a alpha map to produce patters using ColorOverlay? like red(colorOverlay) scratch(alpha Map) appearing when player is attacked by a an animal?

That’s not hidden features, it’s just that i did not find the time to document them :stuck_out_tongue:

But now that you’ve unlock them you can use them plenty :wink:


iamcreasy said:
Is it possible to take it as an request, to use a alpha map to produce patters using ColorOverlay? like red(colorOverlay) scratch(alpha Map) appearing when player is attacked by a an animal?

This is a good idea, but i don't know if it's relevant to put it in the core engine.
I designed the filter system so that people can easily make their own filters, and eventually contribute them back to the community
(for example in a similar way than the asset pack, you would have a filter pack, or maybe just code snippets).

I suggest that you go ahead and make this filter. It's fairly easy, and you can use the ColorOverlay as a basis.
Of course, I will guide you. Don't be afraid of the shader part of the process, at first shaders can look scary, but honestly, it's not that difficult

And of course it's just a suggestion, you don't have to accept :p

Yes of course, I am very curious about the shader/filter part :stuck_out_tongue:



When I am done with my first level, i am gonna put the development aside, and start working on some “gooood-stuff” :stuck_out_tongue:



By this time, I wanna study shader related doc. So, where should I start? Should I start googling about GLSL?

you can yes it’s always a good start :p…

You can also read the documentation in the wiki about that here : https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:jme3_shaders



Your own filter has to extend the Filter abstract class (just copy the coloroverlay filter for a starter)

The idea behind filters is that we render the scene to a texture, and we apply the texture on a full screen quad. In the process, we combine the texture with our effect.



You don’t have to take care of that, the FilterPostProcessor does it for you. so the rendered scene will be passed to your shader as a material attribute named Texture ( m_Texture in the shader).



So basically the filter is a quad on your screen on which you apply a material with the rendered scene as a texture…

For example the color overlay filter just multiply the given color with the pixel color fetched from the texture.

In your case, you would have to fetch the alpha map pixel, and mix the alpha value with the resulting color.