i get a wrong DirectionalLightShadow effect with a model(a swimming fish) playing skeleton animation.
during swimming animation process, there are twinkling sticks poking out of the fish shadow’s mouth and top fin at some particular frames.
the screen shot is here below
https://skydrive.live.com/?cid=0ceee954bd593f63&id=CEEE954BD593F63!115&sff=1&authkey=!AMj1oTrV-8YQG5M
i use soft CompareMode in AbstractShadowRenderer, because my hardware seems do not support sampler2DShadow.
i setup this shadow effect by
[java]
private void setupShadow() {
dlsr = new DirectionalLightShadowRenderer(assetManager, 512, 1);
dlsr.setLight(sun);
dlsr.setLambda(0.55f);
dlsr.setShadowIntensity(0.6f);
dlsr.setEdgeFilteringMode(EdgeFilteringMode.Nearest);
//dlsr.displayDebug();
viewPort.addProcessor(dlsr);
dlsf = new DirectionalLightShadowFilter(assetManager, 512, 1);
dlsf.setLight(sun);
dlsf.setLambda(0.55f);
dlsf.setShadowIntensity(0.6f);
dlsf.setEdgeFilteringMode(EdgeFilteringMode.Nearest);
dlsf.setEnabled(false);
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
fpp.addFilter(dlsf);
viewPort.addProcessor(fpp);
rootNode.setShadowMode(ShadowMode.Off);
fish.setShadowMode(ShadowMode.Cast);
ground.setShadowMode(ShadowMode.Receive);
}
[/java]
the DirectionalLight is defined as below
[java]
sun = new DirectionalLight();
sun.setDirection(new Vector3f(-0.1f, -0.2f, -1.0f).normalizeLocal());
rootNode.addLight(sun);
[/java]
the fish model and its animation is loaded like
[java]
fish = assetManager.loadModel(“fish.mesh.xml”);
fish.scale(5.0f, 3.0f, 3.0f);
rootNode.attachChild(fish);
control = fish.getControl(AnimControl.class);
channel = control.createChannel();
channel.setAnim("swim");
channel.setSpeed(0.6f);
channel.setLoopMode(LoopMode.Loop);
[/java]