Heavy Moire on texture though anisotropic filtering

I have a heavy moire on the streets of a model as terrain.

I so far changed every setting I could think of (see shots) - even went

through all of the MipmapStates.



In the shots you can see the quality increase

  • Biggest change with setting Texture.FM_NEAREST to Texture.FM_LINEAR.
  • Also a good quality increase by setting aniso level to max.



    I played with most settings of the GeForce 7700 Go I use.

    But there’s still a heavy moire on all the pavemant textures (jpg, 256x256).



    Maybe someone has an idea?















I see you are using jME 1.0.  It's possible you are passing FM and MM to the wrong methods if setting FM helped your problem (because FM is for filtering things when they are close up.)  Can you post your texture setup code?

Model is a imported (SimpleGame) obj-export from 3ds Max and looks fine in it, in some other modelers and render systems too. To find the problem I go through all texure states and change settings for testing.



The reset method:


    private void resetTextureStates() {

        //Goes through all the Texture[States] and switches params per key input
        //land is the spec model as terrain

        int nLandChilds = land.getQuantity();

        for(int i=0; i<nLandChilds; i++) {
           TriMesh landChild = (TriMesh)land.getChild(i);
           TextureState landChildTS = (TextureState)landChild.getRenderState(RenderState.RS_TEXTURE);

           if(landChildTS != null) {
              landChildTS.overrideAnisoSupport(true);
              landChildTS.setCorrection(correctionMode);
              int nLandChildTextures = landChildTS.getNumberOfSetTextures();

              for(int j=0; j<nLandChildTextures; j++) {
                 Texture landChildTex = landChildTS.getTexture(j);
                 landChildTex.setFilter(increaseFilter);
                 landChildTex.setMipmapState(decreaseFilter);
                 landChildTex.setAnisoLevel(anisoLevel);
              }
           }
        }

        land.updateRenderState();
        printReport();
    }



and the toggle methods:


        if(KeyBindingManager.getKeyBindingManager().isValidCommand("corrMode", false)) {

             //Toggle CorrectionMode of TextureState
            if(correctionMode == 1) {
               correctionMode = TextureState.CM_AFFINE;
            } else {
               correctionMode = TextureState.CM_PERSPECTIVE;
            }
           
            resetTextureStates();
        }

        if(KeyBindingManager.getKeyBindingManager().isValidCommand("filter", false)) {

             //Toggle increase filter of texture
            if(increaseFilter == 1) {
               increaseFilter = Texture.FM_NEAREST;
            } else {
               increaseFilter = Texture.FM_LINEAR;
            }
           
            resetTextureStates();
        }


        if(KeyBindingManager.getKeyBindingManager().isValidCommand("mipmap", false)) {

             /* changes through the different mipmapping methods
                Definition str_mipMethod: "MM_NONE"              0
                                          "MM_NEAREST"           1
                                          "MM_LINEAR"            2
                                          "MM_NEAREST_NEAREST"   3
                                          "MM_NEAREST_LINEAR"    4
                                          "MM_LINEAR_NEAREST"    5
                                          "MM_LINEAR_LINEAR"     6
             */

            mipMode++;

            if(mipMode > 6) {
               mipMode = 0;
            }

            resetTextureStates();
        }


        if(KeyBindingManager.getKeyBindingManager().isValidCommand("aniso", false)) {

             //increase level (percentage) of anisotropic filtering from min to max (1.0) in quater steps
            anisoLevel += 0.25f;
            if(anisoLevel > 1.0) {
               anisoLevel = 0;
            }
            resetTextureStates();
        }

Moir

2.0 utilizes anisio level by default on all textures

Ok, is there a little more info, maybe it could easily been implemented in jme 1.0?

Actually, the aniso code should be the same.  I would bet that moving to 2.0 forced you to clear up the filter settings because of the Enums.

Moir