My scene renders fine with no post-processing or PSSM shadows or whatever. All the faces have normals pointing the right way.
My scene also renders fine with post processing (DOF and Bloom).
However, if I have PSSM shadows on, the front of every face (Of the scene or of other things) goes black (I tried changing the shadow intensity but that did nothing). But the backside of the face (The side the normals point away from), renders fine. Also, TestPSSMShadows works fine.
Oh, something else I forgot, displayDebug is all white.
I’m using a .scene for my world, and .objs for some objects in it. Converting the .scene to a .j3o has no difference.
Source Code:
http://dl.dropbox.com/u/9078394/Ardiss.zip
The only important ones are Main (Which sets up PSSM and such) and World (Which loads the models).
The scene is ~12MBs so I’m not uploading it unless necessary.
Can’t find an edit button.
Below is the code that I use to create the PSSM shadow renderer. I also call rootNode.setShadowMoode(ShadowMode.CaseAndReceive); and I do the same to the models I load.
PssmShadowRenderer pssm = new PssmShadowRenderer(assetManager, 512, 3);
pssm.setDirection(new Vector3f(1, 1, 1).normalizeLocal());
pssm.setLambda(0.55f);
pssm.setShadowIntensity(0.6f);
pssm.setCompareMode(CompareMode.Software);
pssm.setFilterMode(FilterMode.Bilinear);
pssm.displayDebug();
viewPort.addProcessor(pssm);
the shadowProcesor has to be added before the FilterPostPorcessor to the viewport.
@nehon said:
the shadowProcesor has to be added before the FilterPostPorcessor to the viewport.
Thanks for trying, but I already knew that. The problem persists irregardless of the order or if i've added the FilterPostProcessor at all, so I doubt the problem is related to that.
what happens if you enable only the shadowRenderer and not the filterPostProcessor?
also could you post a screen shot of the issue?
This is how it looks if PSSM shadows are enabled (Looks like this with and without FilterPostProcessor. If you must know, I didn’t have it in this shot). You can only see the skybox plus the backsides of faces (Plants are all one-sided, you can see the underside of them, which is why they are visible here. If you manage to get the camera under the world somehow, everything’ll be lit up.
http://dl.dropbox.com/u/9078394/AllBlackIssue.png
With shadows disabled, it looks something more like:
http://dl.dropbox.com/u/9078394/ArdissProgress.png
(I stole the level from Pikmin. It’s just a placeholder though, Don’t go charging any lawsuits, Nintendo)
Can you keep PSSM filter attached but then play with the shadow modes? E.g. cast / receive?
Also make sure the skybox has shadows disabled
I also call rootNode.setShadowMoode(ShadowMode.CaseAndReceive); and I do the same to the models I load.
Is this correct? I think rootnode should not cast and recieve shadows.
@androlo said:
Is this correct? I think rootnode should not cast and recieve shadows.
Do note that the skybox might cast shadows as well. I would recommend checking those modes again.
Using CastAndReceive on the whole scene can be very prohibitive especially in terms of shadow map resolution and precision.
Sorry for not responding.
@Momoko_Fan said:
Do note that the skybox might cast shadows as well. I would recommend checking those modes again.
Using CastAndReceive on the whole scene can be very prohibitive especially in terms of shadow map resolution and precision.
Turrns out that was the case. Thanks!