Lines and incomplete shadow draws?

I’m having some issues using the light renderers. I’ve tried using increase graphics settings by upping the number of passes and increasing the shadow map size. The shadows look sharper but I keep getting strange incomplete shadow drawings.

private void initLightRenderers(Light light){
        if (light.getType() == Light.Type.Directional){
            DirectionalLightShadowRenderer DLshadowRender = new DirectionalLightShadowRenderer(gameManager.app.getAssetManager(), control.getShadowMapSize(),control.getShadowSplits());
            DLshadowRender.setLight((DirectionalLight)light);
            DLshadowRender.setEdgeFilteringMode(control.getEdgeFilteringMode());
            DLshadowRender.setShadowIntensity(control.getShadowIntensity());
            DirectionalLightRenderers.add(DLshadowRender);
          } else if (light.getType() == Light.Type.Point){
              PointLightShadowRenderer PLshadowRender = new PointLightShadowRenderer(gameManager.app.getAssetManager(), control.getShadowMapSize());
              PLshadowRender.setLight((PointLight)light);    
              PLshadowRender.setShadowIntensity(control.getShadowIntensity());
              PLshadowRender.setEdgeFilteringMode(control.getEdgeFilteringMode());
              gameManager.app.getViewPort().addProcessor(PLshadowRender);
              PointLightRenderers.add(PLshadowRender);
          } else if (light.getType() == Light.Type.Spot){
              SpotLightShadowRenderer SLshadowRender = new SpotLightShadowRenderer(gameManager.app.getAssetManager(), control.getShadowMapSize());
              SLshadowRender.setLight((SpotLight)light);    
              SLshadowRender.setShadowIntensity(control.getShadowIntensity());
              SLshadowRender.setEdgeFilteringMode(control.getEdgeFilteringMode());
              gameManager.app.getViewPort().addProcessor(SLshadowRender);
              SpotLightRenderers.add(SLshadowRender);
          }
    }

directional light

point light

The point light has less problems than the directional. The spot light draws perfect every time. Is there a way to get rid of the lines in the shadows ?

Might be a z-fight issue. Maybe use different Z-Compare function (example: it’s a difference if you chose “less than” or “less than or equal”). Don’t know the exact syntax for this, but jME 3.1 added something that jME 3.0 doesn’t have.

Seems entirely related to the shadow map size to me… and the other settings related to splitting.

Since direction light draws the most stuff to cram into a shadow map, it will show resolution issues the worst.

Followed by point light… which draws the next most amount.

And finally spotlight which will draw the smallest shadow map possible.

If you are unfamiliar with how shadow maps work then it’s worth reading about to figure out the settings that are best for your scene.