TerrainGrid ”tiles” boundaries visible (9 posts)

Topic tags: boundaries, tiles
  • Profile picture of yanick yanick said 3 months ago:

    Looking at this screenshot, could someone find what’s wrong with this?

    Screenshot TerrainGrid boundaries showing

    Each tiles are 129×129, the terrain is scaled to [6, 1, 6].

  • Profile picture of normen normen1291p said 3 months ago:

    Theres seams at the grid borders :P What version of jme3 is this? Vanilla beta? Try updating to latest stable.

  • Profile picture of yanick yanick said 3 months ago:

    The IDE says I’m at the most recent version; 3.0.0.9083 (is there another update? or an update issue?)

  • Profile picture of normen normen1291p said 3 months ago:

    How do you create the material?

  • Profile picture of yanick yanick said 3 months ago:

    This is the terrain initialization code :

    Material mat_terrain = new Material(assetManager, "Common/MatDefs/Terrain/TerrainLighting.j3md");
    mat_terrain.setBoolean("useTriPlanarMapping", false);
    //mat_terrain.setBoolean("isTerrainGrid", true);
    mat_terrain.setFloat("Shininess", 0.0f);
    
    // mountain texture (red)
    Texture rock = assetManager.loadTexture("Textures/Terrain/rock_brown.jpg");   // 512x512 image
    rock.setWrap(WrapMode.MirroredRepeat);
    mat_terrain.setTexture("DiffuseMap", rock);
    mat_terrain.setFloat("DiffuseMap_0_scale", 32f);
    
    // grass texture (green)
    Texture grass = assetManager.loadTexture("Textures/Terrain/grass.jpg");      // 512x512 image
    grass.setWrap(WrapMode.Repeat);
    mat_terrain.setTexture("DiffuseMap_1", grass);
    mat_terrain.setFloat("DiffuseMap_1_scale", 64f);
    
    // dirt texture (blue)
    Texture dirt = assetManager.loadTexture("Textures/Terrain/dirt.jpg");         // 512x512 image
    dirt.setWrap(WrapMode.Repeat);
    mat_terrain.setTexture("DiffuseMap_2", dirt);
    mat_terrain.setFloat("DiffuseMap_2_scale", 32f);
    
    // each tiles are 129x129
    this.terrain = new TerrainGrid("terrain", 129, 257, new ImageTileLoader(assetManager, new Namer() {
        /* ...snip... */
    });
    
  • Profile picture of normen normen1291p said 3 months ago:

    @Sploreg, any idea?

  • Profile picture of yanick yanick said 3 months ago:

    If it can help, I have these filters set also :

    FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
    //fpp.setNumSamples(4);
    
    SSAOFilter ssaoFilter = new SSAOFilter(0.92f, 2.2f, 0.46f, 0.2f);
    fpp.addFilter(ssaoFilter);
    
    WaterFilter waterFilter = new WaterFilter(node, reflectionLight);   // node == rootNode
    waterFilter.setUseRipples(true);
    waterFilter.setWaterHeight(waterHeight);
    waterFilter.setWaterTransparency(0.12f);
    waterFilter.setRefractionStrength(0.2f);
    waterFilter.setUseFoam(false);
    waterFilter.setWaterColor(waterColor);
    waterFilter.setDeepWaterColor(deepWaterColor);
    fpp.addFilter(waterFilter);
    
    BloomFilter bloomFilter = new BloomFilter();
    bloomFilter.setExposurePower(55);
    bloomFilter.setBloomIntensity(1.0f);
    fpp.addFilter(bloomFilter);
    
    if (env.hasLight("Sun")) {        // custom "world environment" settings container
         LightScatteringFilter sunLight = new LightScatteringFilter(reflectionLight.multLocal(-300));
         sunLight.setLightDensity(1.0f);
         fpp.addFilter(sunLight);
    
         ColorOverlayFilter overlayFilter = new ColorOverlayFilter(env.getLight("Sun").getColor());
         fpp.addFilter(overlayFilter);
    }
    
    DepthOfFieldFilter dof = new DepthOfFieldFilter();
    dof.setFocusDistance(0);
    dof.setFocusRange(400);
    fpp.addFilter(dof);
    
    viewPort.addProcessor(fpp);
    
  • Profile picture of Sploreg Sploreg206p said 2 months, 4 weeks ago:

    hmm, I wonder if something with the material changed somewhere or if there is some side effect. It kind of looks like the normals on the edges might be a little wrong, but that bug was fixed ages ago.
    I will take a look at it in the next few days after I get my machine fixed.

  • Profile picture of Sploreg Sploreg206p said 2 months, 3 weeks ago:

    Alright I put up a fix for it on trunk, the latest nightly should have it (not beta version).