Where is FogFilter?

I’m trying to use the fog workaround for jme3, but I can’t seem to locate com.jme3.post.filters.FogFilter - it doesn’t seem to be in the libraries anymore…

how do I fix this?


mhhh it’s still there…


What version do you use?

yes I found this file earlier, and created a new class file in my project with it - but there was lots of compile problems,

should I add it to the library?

what’s the correct way to get it working in jme3,


Sorry to butt in. Can this fog filter be used to create a distant haze? (if so, how)

I like objects in the far distance to blend to white so they merge with the horizon, rather than show a ‘hard’ map end.

Thank you

duh, didn’t realise alpha 3 was released… was using 2.

here is the demo code for fog,


@xp61 that makes sense :p, FogFilter was not in alpha 2

@durandal yes try to play with the fogDistance parameter, look at the test linked by xp61, you can tweak parameter with the y,h,u,j keys.

Thanks for the info. Looks very nice and I might use it, but not exactly what I intended.

I like the objects in the far distance to fade out and start to blend with the horizon so I can stil see the sky box, but not the hard edge between the landscape and the sky box. Or is this fog height limited too?

I’m very happy with the results :slight_smile:

Unfortunately blending into the skybox is somewhat more complex than one might think. There are several ways to achieve it but none are as simple as using nehon’s FogFilter.

One way is that you determine the fog color by sampling the cubemap using the view vector in the shader (but that means the FogFilter needs to have your cubemap).

How about the height limit of the fog? Is that possible?

Not with the current filter i’m afraid.

Could be doable, but we would need a clipping plane, and that’s not implemented in JME3 for the moment.