Screen Space Ambient Occlusion Problem

Hi all, I want to use Screen Space Ambient Occlusion (SSAO) in my code. But SSAO not works, I got error.



This is my code:



package mygame;



import com.jme3.app.SimpleApplication;

import com.jme3.renderer.RenderManager;



public class Main extends SimpleApplication {



public static void main(String[] args) {

Main app = new Main();

app.start();

}



@Override

public void simpleInitApp() {



com.jme3.post.FilterPostProcessor fpp = new com.jme3.post.FilterPostProcessor(assetManager);

com.jme3.post.ssao.SSAOFilter filter = new com.jme3.post.ssao.SSAOFilter(viewPort, new com.jme3.post.ssao.SSAOConfig(0.36f,1.8f,0.84f,0.16f,false,true));

fpp.addFilter(filter);

viewPort.addProcessor(fpp);



com.jme3.scene.Spatial spatial = assetManager.loadModel(“Scenes/Sale/Sale.j3o”);

rootNode.attachChild(spatial);

}



@Override

public void simpleUpdate(float tpf) {

//TODO: add update code

}



@Override

public void simpleRender(RenderManager rm) {

//TODO: add render code

}

}



And error:



2010-10-03 20.13.10 com.jme3.app.Application handleError

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.IllegalStateException: Framebuffer object format is unsupported by the video hardware.

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

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

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

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

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

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

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

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

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

Java Result: -1073741819



Framebuffer object format is unsupported by the video hardware. How to fix problem?

Hi

What video card do you use? it seems that it does not support Framebuffer.

Have you tried other filters? or shadow mapping?

Those filters uses Framebuffers as well so it could give an idea of the problem

I think it might have something to do with you using Depth32F for the SSAO depth buffer, maybe you should use Depth instead?

Depth32F might not be supported on older hardware.

I think i changed it already…

I’ll check that tonight

My video card: NVIDIA GeForce 7300GT



I tried com.jme3.shadow.BasicShadowRenderer and com.jme3.shadow.PssmShadowRenderer shadows.BasicShadowRenderer and PssmShadowRenderer works in my code. But these shadows not look great in my scene.

OK the normal FrameBuffer format was RGB32f, i changed it to RGBA8.

Can you test it from last svn please?

Must i download something? Can you explain me how must i test it step by step?

vacumas said:
Must i download something? Can you explain me how must i test it step by step?

If you use jMP, just enable the nightly update center under Tools->Plugins, the change should be in the nightly update by now.

I updated my jMonkeyPlatform Alfa - 2, but my code not work. I not have experence with OpenGL, but error is - GL_FRAMEBUFFER_UNSUPPORTED_EXT.



I got error:



INFO: Child (Scenes/Sale/Sale-scene_node) attached to this node (Root Node)

2010-10-05 12.13.53 com.jme3.app.Application handleError

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.IllegalStateException: Framebuffer object format is unsupported by the video hardware.

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

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

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

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

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

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

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

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

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

Java Result: -1073741819

Got same problem for a lot of the tests in jme3. Just downloaded latest nightly build 11-16-2010. Using it in eclipse only.



I’ve got a Geforce 8800 GT if it can help.

It looks like a driver problem to me, geforce 8800 gt should definitely support framebuffer.

Please try to update your drivers

I got version 260.61. I’ll try update it anyway.

You were right Nehon, updated to 260.99 seems to have fixed it. Thanks you.

Good to hear!

I don’t know why but for somes reason i don’t understand until now.



When running multiples time the same program without changing anything, sometime it works, sometimes texture not there or similar or



[java]17-nov.-2010 10:56:25 com.jme3.renderer.lwjgl.LwjglRenderer setFrameBuffer

GRAVE: Problem FBO:

FrameBuffer[format=640x480x0, drawBuf=0]

Depth => TextureTarget[format=Depth]

Color(0) => TextureTarget[format=RGB8]



17-nov.-2010 10:56:25 com.jme3.app.Application handleError

GRAVE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.IllegalStateException: Framebuffer object format is unsupported by the video hardware.

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

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

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

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

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

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

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

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

at java.lang.Thread.run(Thread.java:619)[/java]





If i wait 5 minutes, then restart, program launch without error (with or without graphical bug and super slowness). After i restart again, and Framebuffer error :|.

I’ve noticed that I had another program, that could use opengl from times to times (A 3D modeler). I closed the program, and it seems to have solved the problem.

Weird isn’t it ?

For our reference, could you tell us what 3D modeler you’re using, and which version of it?

Yes, I was running Thea render (and it wasn’t on the "Opengl viewport), juste closed it and voila …

Same with Blender :expressionless:

Just a wild guess, maybe its running out of framebuffer memory?

In that case, just don’t run multiple 3D software at the same time.