Render transparent geometries without FilterPostProcessor affecting them

Hi!

I’m having some trouble using buckets and FilterPostProcessor.
Basically I want to add Fog to my scene, and for this I’m using a FogFilter. Now everything looks fine except for a sprite that includes transparency. To render this correctly I put it into the Transparency Bucket. The transparency works fine, but it doesn’t include the fog in the background.
Now, I know that the fog is applied only after the Geometries in the Transparency Bucket have been rendered, so I decided to put my geometry in the Translucent Bucket. But a more unpleasant problem has arisen! The sprite is now being rendered over any other geometry, and this doesn’t look good.

Is there a solution where the geometry isn’t affected by the fog filter and isn’t rendered over any other geometry?

Thanks!

Use a material-based fog. There is one for lighting.j3md already if you’re using that. You’ll have to use alpha-3 (?) or above. This way you can set fog on some things and not others without any post-processing or bucket issues. Either enable it or don’t for each material/object.

1 Like

Yeah, post-process fog is an ugly hack that will only work properly in less than half the cases. I guess some people really love it but I think it’s the least useful post processing filter that we have. If lighting and PBR support this now, I suggest maybe we just deprecate the fog filter.

1 Like

Thank you! How can I upgrade jme3 to the last version? It seems like lighting.j3md doesn’t have these parameters in my version.

latest version is currently 3.3-beta1

For SDK user:

there is SDK for 3.3 beta1 so you can download it. its beta1 released yesterday

but if you want fix it manually:
by default if you use SDK, it use ANT build for project, there you might play arround with properties/libs. (that i dont remember now how to change)

for Any User:

if you would use gradle build, its very easy, you just change version number for all JME packages in gradle.build