Weird effect when using glow on gui viewport

If i use a bloom processor on the gui viewport i have a weird effect. It works fine if i use it on the scene viewport.

I followed the instructions from https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:bloom_and_glow?s%5B%5D=glow



Is the glowing effect meant to work in the gui viewport?

I dont think it is…

Lutherion said:
Is the glowing effect meant to work in the gui viewport?

Not at all....never came to my mind that it could be used like this to be honest :p

Damn… :wink:

Could you elaborate? Maybe we can find a way to work around this.

What is it you want to make glow? BitmapText ?

Actually there are textured quads(with alpha channel), colored quads and bitmaptext, everything that is used for a gui and rendered as “2D” components. Perhaps the easiest way to handle this is to use the standard viewport and put the gui in the gui bucket but i think you guy’s had a reason for the gui viewport to be the standard location for the gui.

Is there anything new on this since then btw? Could be really usefull for hovereffects and similar.

nope, i have to look at this

I don’t see any reason why bloom would not be compatible with this, after all, its an image-based effect

yeah it should, but apparently it doesn’t :stuck_out_tongue:

What’s the mat’s materialDefinition?

I don’t know, its a picture:

[java]Picture pic = new Picture(“HUD Picture”);

pic.setImage(assetManager, “Interface/small/x.png”, true);

guiNode.attachChild(pic);[/java]



Btw maybe it had been better to make a new thread (called “Can’t use glow on hud picture” or something). If some admin wants to do that…

I’m trying to add a glow color to a picture in the gui node this way:

[java]Material mat = pic.getMaterial();

mat.setColor(“GlowColor”, ColorRGBA.White);

fpp=new FilterPostProcessor(assetManager);

BloomFilter bloom= new BloomFilter(BloomFilter.GlowMode.Objects);

fpp.addFilter(bloom);

viewPort.addProcessor(fpp);[/java]



but get IllegalArgumentException: Material parameter is not defined: GlowColor

Ok, picture uses the gui.j3md material definition and it doesn’t support glow.



Also, i’m not sure that it would yield what you expect as a result even if it was.



This would just make a white glowing square on the screen, is it what you want?

Thanks for your answer.



No, I need a glow around the picture… but I forgot it has a transparent background, the glow would be anyways around the square and not the shape… :confused:



Probably I have to create images with the “effect” and swap.

Why don’t you just do the effect in photoshop? :?

That’s what I meant with “create images”.