[Help] Shadow did not work properly on boxes


Just look the pic below…(the pic tells all my words)

All lights code

[java] DirectionalLight dl = new DirectionalLight();

dl.setDirection(new Vector3f(-2.1f, -0.7f, -1).normalizeLocal());

dl.setColor(new ColorRGBA(1f, 1f, 1f, 1.0f));


AmbientLight als = new AmbientLight();

als.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));



FilterPostProcessor fpp = new FilterPostProcessor(assetManager);

SSAOFilter ss = new SSAOFilter(12.94f, 43.92f, 0.63f, 0.61f);



pssmRenderer = new PssmShadowRenderer(assetManager, 1024, 3);

pssmRenderer.setDirection(new Vector3f(-2.1f, -0.7f, -1).normalizeLocal()); // light direction





the shadow on the box didnt render properly…“Only on the box”

anybody know why this is happen ?

thank you for any reply…

anybody please

Sorry, I don’t know enough about the shadow stuff to help.

Have you tried just dropping a plain cube into the scene and see if that has the same problem? That will help show if it is a problem with your model/material or with all shadows…

It’s a shadow problem. You could try messing with the depth bias. Or if JME supports it, the depth offset.

Read this for more information on shadows(JME uses shadow mapping):


Sadly though, if you didn’t know what was wrong just from looking at it, you have little chance of fixing it unless JME developers already have settings you can edit.

By default the PreShadow material sets polygon offset to 5, 0.

You can set a RenderState override on the RenderManager to force it to 0, 0, but you might see other artifacts.