My WIP has many geometries like the wooden platform shown below. Its Mesh was created in Blender and imported into JME via glTF. The Material is Phong-shaded (lit) material with a 1024x1024 “DiffuseMap” texture. The texture has a Bilinear magnification filter and a Trilinear minification filter. I’ve cranked up the multi-sampling anti-aliasing to 8x, but I’m still not satisfied with the render quality.
When the camera is motionless, there’s obvious aliasing around the “cracks” in the texture. When the camera moves, the cracks appear to shimmer. The aliasing and shimmering subside when the camera gets close to the platform. I don’t understand why.
Probably I’m missing something obvious. Any suggestions?
PS: I’ve also tried texture.setAnisotropicFilter(16);
PPS: Here’s my graphics configuration:
What’s the wire frame look like? From a static picture it’s hard to tell but when I see aliasing like that then I think “polygon edge” and not “texture”.
Other than that, I’d confirm that the loaded texture really does have a min filter, is mipmapped, etc… assuming you haven’t already confirmed that by dumping the values at runtime.
Edit: looking again, it’s definitely acting like there is no min filter.
TextureKey key = new TextureKey(path);
key.setGenerateMips(true);
Texture t = assets.loadTexture(key);
I don’t know that it will make a difference but I for some reason got in the habit of always specifying.
Edit: also try leaving the min/mag filtering as default and see what happens. I guess I’ve never used Trilinear min filter so I have no basis to know if it will/won’t work… and/or maybe it requires MIP mapping.
Invoking setGenerateMips(true) didn’t help the test app, but when I tried it on my WIP, it solved the shimmering issue (!)
Feeling much happier now.
The aliasing issue is still present in both the WIP and the test app. I would love to solve it as well. However, it’s only noticeable in closeups when the camera is stationary. I can live with it.