Hi there,
Been trying out ShadowHelper in the new JPCT-AE along with some animated characters.
Generally works great! However, I have noticed some artifacts where shadows do not appear to render properly on the receiver when the casting object (in this case a bones character) is very close.
In particular, you can see in the images below, the feet of the characters result in a "hole" in the shadow when the feet are near or on the floor. I've tried experimenting with raising the object further up off the floor - and then it looks OK at some point (no "holes"), however then the scene of course doesn't look right since the character appears floating above the floor, instead of standing on it.
All objects/meshes from the character are added as casters, and the floor is the single receiver.
ShadowHelper.setShadowMode(GLSLShadowInjector.PCF_FILTERED_SHADOWS);
Projector projector = new Projector();
sh = new ShadowHelper(mRenderer.mFrameBuffer, projector, 1024);
projector.setClippingPlanes(1f, 1000f);
projector.setFOVLimits(0, 999);
float fov = projector.convertDEGAngleIntoFOV((float) fieldOfView);
projector.setFOV(fov);
projector.setYFOV(fov);
projector.setPosition(sv);
projector.lookAt(caster.getTransformedCenter());
sh.setLightSource(projector);
int intColor = Utils.parseColor(shadowColor);
int red = Color.red(intColor);
int green = Color.green(intColor);
int blue = Color.blue(intColor);
sh.setAmbientLight(new RGBColor(red, green, blue));
sh.addCaster(caster);
AnimatedGroup group = getGroup(casterName);
if (group != null) {
for (Animated3D a : group) {
sh.addCaster(a);
}
}
sh.addReceiver(receiver);
Any ideas for config or anything else I may be doing wrong? Example image attached.
Thanks!