Trouble with Bloom/Glow Effect

I’m pretty new to jME, I recently just started toying around with it a few days ago. I’m still working through the tutorials, but I’ve got a basic scene setup with some textured models loaded into it. I wanted to add a glow effect to some of them so I set the GlowColor and GlowMap for the models’ materials and then did the following:



[java]

FilterPostProcessor postProcessor = new FilterPostProcessor(assetManager);

BloomFilter bloomFilter = new BloomFilter(BloomFilter.GlowMode.

bloomFilter.setDownSamplingFactor(2.0f);

postProcessor.addFilter(bloomFilter);

viewPort.addProcessor(postProcessor);

[/java]



This seems like it should work to me, but after I added the postProcessor, I get the following exception whenever I try and run my game:



java.lang.IllegalStateException: Incomplete draw buffer.

at com.jme3.renderer.lwjgl.LwjglRenderer.checkFrameBufferError(LwjglRenderer.java:1294)

at com.jme3.renderer.lwjgl.LwjglRenderer.setFrameBuffer(LwjglRenderer.java:1546)

at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1103)

at com.jme3.renderer.RenderManager.render(RenderManager.java:1162)

at com.jme3.app.SimpleApplication.update(SimpleApplication.java:264)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)

at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:218)

at java.lang.Thread.run(Thread.java:662)



Everything was working perfectly fine, before, and if I comment out the line [java]viewPort.addProcessor(postProcessor);[/java] it works fine again. Anyone have any idea why this is happening?



Oh and some possibly relevant information, my game extends the SimpleApplication class and I am working on my laptop, which is running on an Intel Mobile 4 Series Graphics processor (not the best I know, but it’s all I’ve got atm)

Just curious, where are you adding the processor? in simpleInit(), simpleUpdate(), or somewhere else?

In my simpleInit() method. Could that possibly be a problem?

No… that’s where I was going to have your try moving it if it was somewhere else. :slight_smile:

Also, quick update, I get that error whenever I add any FilterPostProcessor to the viewport, regardless of what or how many filters I’ve attached to it. I also made sure I was using the latest nightly build and that my graphics drivers were all up to date and I still get the error.

Correction: I just tried adding the postProcessor to the viewport without having added any filters to it, and the game ran fine, except this is of no use to me since I still can’t add any filters… :x

So I’ve been doing all I can with my limited knowledge to try and figure this out, but the only “progress”, if you could call it that, that I’ve made is I tried declaring the [java]FilterPostProcessor postProcessor = new FilterPostProcessor(assetManager); [/java] as a class field instead of as a local variable in simpleInit(); and I now get a NullPointerException instead, but now that I think about it, seems like it’s just because the assetManager field hasn’t been initialized yet…

Does anyone have any clue what could possibly be going on here? This has been frustrating me for days now. :x :x :o

Based on the information provided it may just be that post processing will not work on your graphics card. I believe it requires things like non-power of two texture support, etc…



Others are more familiar with what hardware works with what feature than I am.

Intel Mobile 4 Series Graphics processor …



Not good, be happy that it supports opengl at all, intel grafics are always a problem and will always be for any 3d rendering. Even the cheapest amd/nvidia card usually beats them performance and supported stuff wise.

Damn… After a while I had sort of suspected, but really hoped that wouldn’t be the case. Well guess I can’t work on this till I have access to some better equipment again. Well anyway, thanks for help guys.

Hey, yes it can be due to the graphic card poor support of frame buffers, but maybe try to update you drivers, it could help.



Have you got the same kind of error when using a PSSMRenderer for shadows, or it’s just the FilterPostProcessor?

Yeah, I just installed the latest drivers, but I still get the error. But interestingly, the PssmShadowRenderer works fine for me.

I actually have a ATI 5850 and a new Intel Core i7 and I am getting the same issue. I highly doubt there is any “lack of support” comming from my hardware.

Maybee this one?

http://electroholiker.de/?p=922

3 years later, exactly the same issue still happens on recent desktop computers equipped with a Intel HD Graphics onboard chip with the latest driver. JME3 reports it does support OpenGL 4 tough so basically, it should support all shaders, I have manually checked in all j3md definition files and it’s all requiring at least GL100 or GL120 so it should work, but it just doesn’t. The game runs fine shaderless tough. Did you guys isolate the issue to the non power of 2 textures not being supported? While I was at this guy’s house, I have not had the reflex to check if this feature was supported or not from within my JME3 app debug screen. It would be interesting to know what really makes the app crash so that I could IF-branch it on Intel HD Graphics cards.

Non power of 2 support could be an issue indeed but I would expect opengl to crash with a more explicit error…but you never know :stuck_out_tongue:
I guess this check could be added to the FPP as it’s pretty obvious it needs it…unless you have a square display.