Hey guys,
I have a problem with the PSSMShadowrenderer.
As you can see on the screenshot there is a black layer over the field. When I zoom out the shadow descends and the proper shadows become visible. I use the following code for the shadows:
[java] PssmShadowRenderer pssmRenderer = new PssmShadowRenderer(assetManager,
1024, 2, PssmShadowRenderer.EDGE_FILTERING_PCF);
pssmRenderer.setDirection(new Vector3f(1, -1, -1).normalizeLocal());
pssmRenderer.setShadowIntensity(.5f);
pssmRenderer.setLambda(0.7f);
viewPort.addProcessor(pssmRenderer);
[/java]
The rootnode contains the green field, the waterplane and a skybox. I detached everything separately but nothing removed the black layer.
Has anyone an idea where the problem could lie?
mhh strange…i don’t have the issue
could you try with more splits? ( the 2 param in the constructor try with 3, 4 etc)
Ok that worked but I had to go up to 8 splits until the black layer disappeared. Thanks a lot!
no no that’s not a solution, 8 splits will kill performances
that was just a test to help me figure it out.
Do you have some custom frustum settings for your camera?
Argh ok. No I don’t have any custom settings. Works fine on my(!) computer though
i’ll need a test case I cannot reproduce the error
I found something new. I decreased the width and height of my field and saw that the black layer has a strange triangle(left side of the picture) shape, which expands when I scroll to the north and then suddenly breaks of to the left again(right part of the picture). Maybe that helps.
I should add that the field is being created with the GeometryBatchinstance, which led me to experimenting with the boundingbox of said field. For example I commented out the part where I set a new Boundingbox [java]newField.setModelBound(new BoundingBox()); [/java] which had some pretty strange effects onto the shadows.
Sometimes I could only see a small hint of a black layer in the corner and sometimes no shadows at all Pic:

Can I supply you with anything?
yes…with a piece of code that reproduce the issue
Phew PIECE of code? Oh man. Ok I will try my best to keep it as small as possible. g
I’m a damn idiot. I tried it on my laptop today and it worked without using 8 splits(1 split was enough). The problem disappeared on my computer after I updated my ATI drivers. Sorry for wasting your time
Don’t worry there was no waste.
I’m glad it works now