FogFilter Problem (Filter again)

Hello,



I have already reported problems with filters in my app. Now, I have got an Exception



java.lang.NullPointerException

at com.jme3.material.Material.setTexture(Material.java:301)

at com.jme3.post.FilterPostProcessor.renderFilterChain(FilterPostProcessor.java:162)

at com.jme3.post.FilterPostProcessor.postFrame(FilterPostProcessor.java:179)

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

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

at at.netcrystals.praxiteles.jme3.objects.PraxitelesApplication$PraxitelesApplicationImpl.update(PraxitelesApplication.java:558)

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

at com.jme3.system.lwjgl.LwjglCanvas.runLoop(LwjglCanvas.java:226)

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

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







Seems as if I have to set a material somewhere.



Thanks

Please use the imgur service for inserting pictures (click “Insert…”), I never see any of your pictures. Also show us how you set up the fog filter.

Hello,



sorry, but I use imgur. I’ll check this…



bye,

Equi

Equilibrium said:sorry, but I use imgur. I'll check this...

You're using the page link instead of the direct link to the image, like so:
http://i.imgur.com/m4Jig.jpg

First, does the TestFog works for you?



if it does i need to see the way you initialize the fog filter please.



EDIT : the error is on this line :



mat.setTexture(“m_DepthTexture”, depthTexture);



have you by any chance disabled depth rendering or something like that?

Hello,



my scene is created and I see everthing workin perfect. I have got a viewPort. So I do something like this…



[java]



myFilterPostProcessor = new FilterPostProcessor(myAssetManager);

myViewPort.addProcessor(myFilterPostProcessor);

myFogFilter=new FogFilter();

myFilterPostProcessor.addFilter(myFogFilter);



[/java]



Your Test case works without any problems. It can’t be the graphic card. I must have done something wrong somehwere in my code. Where can I enable/disable depth rendering? In the viewport? This is enabled.



Thanks.



Regards,

Equi

No, don’t get me wrong, i’m not saying you did things wrong, i’m just trying to figure out what’s the problem.

You are using it in JMECanvas or something like that?

And btw, is it the same for every filters?

Hello,



Yes, JMECanvas like you can see on the picture above. Everything else works perfectly and very fluently. Yes, it is the same for all filters. Today, my graphic card produced another error. I don’t think that it has omething to do with filters but it seems as if my OpenGL drivers are too old…



org.lwjgl.LWJGLException: Pixel format not accelerated

at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)

at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)

at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:185)

at org.lwjgl.opengl.Display.createWindow(Display.java:315)

at org.lwjgl.opengl.Display.create(Display.java:855)

at org.lwjgl.opengl.Display.create(Display.java:783)

at com.jme3.system.lwjgl.LwjglCanvas.createContext(LwjglCanvas.java:310)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:98)

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

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



but than I do not understand why the testcase works…



Thanks

i’m gonna try to reproduce this issue, maybe it’s related to the canvas

This error means you do not have any drivers installed on the system from your GPU manufacturer. Installing the latest drivers should fix the issue.

Hello,



at least my scene is rendering now behind the “trash output”. If I change the bloom filter parameters, I see the the blur in the scene changes. However, the “trash output” is still there. It is drawn in front of the scene. Can you please tell me where to enable/disable depth rendering?

Thanks.



Regards,

Equi

@nehon: It might be due to the fact that you don’t clear the framebuffer. Some GPUs might not handle that part correctly

ok I’m gonna look at it.