Anisotropy Level [Solved]

Hi super devs!

I would like to ask you to add Anisotropy level feature request.

Variants to add it:

  • Add this feature to AssetManager like AssetManager.setAnisotropy(x). So that all textures will be with the same anisotropy.
  • Add it to the Material Editor like on the screenshot. http://i.imgur.com/aALIvYQ.png

At present, anisotropy level=0 by default. It’s bad for desktop apps. And it’s difficult to change it for all textures.

See my comparison of anisotropy: http://i.imgur.com/0yiv9.jpg

Thank you a lot.

Ok, @Momoko_Fan gave me a cool hint with AssetEventListener and to change the Anisotromy become very easy! Yahoo!

Here is the code which changes all textures Anisotropy = 8. Just add this code to your simpleInitApp() and everything will be cool :slight_smile: :
[java]
AssetEventListener asl = new AssetEventListener() {
public void assetLoaded(AssetKey key) {
// throw new UnsupportedOperationException(“Not supported yet.”);
}

        public void assetRequested(AssetKey key) {
            if (key.getExtension().equals("png") || key.getExtension().equals("jpg") || key.getExtension().equals("dds")) {
                System.out.println(key.getExtension());
                TextureKey tkey = (TextureKey) key;
                tkey.setAnisotropy(8);
            }
        }

        public void assetDependencyNotFound(AssetKey parentKey, AssetKey dependentAssetKey) {

// throw new UnsupportedOperationException(“Not supported yet.”);
}
};

    assetManager.addAssetEventListener(asl);

[/java]

I think i’ll add it to our wiki soon. As this is very important for developers.

3 Likes

Ok, added to JME docs.
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:anisotropic_filtering

3 Likes