Few beginner problems

Hello, while creating my first jme3 game I’ve run into couple of problems.

First one: Shadows.
I’m using PSSM renderer initialized like this:
[java]PssmShadowRenderer pssmRenderer;
pssmRenderer = new PssmShadowRenderer(assetManager, 1024, 3);
pssmRenderer.setDirection(sun.getDirection().normalizeLocal()); // light direction
//pssmRenderer.setShadowIntensity(.3f);
//pssmRenderer.setLambda(.2f);
viewPort.addProcessor(pssmRenderer);[/java]

And this is the effect:
We can see shadows through objects.

Second one.
The *.obj model I have loaded looks strange. I have completly no idea how to approach this. Thats how I load it:
[java]Spatial tree3 = assetManager.loadModel(“Models/tree.obj”);

    rootNode.attachChild(tree3);[/java] 

And here are screens presenting how all of this looks like:
(the white-ish tree is an *.obj model)


Make sure, you add the shadows before the filters (water etc.) - This solved the problem for me once. :slight_smile:

1 Like

It actually worked :smiley: bloom was before shadows and that was causing it.

Other thing. is it possibile to soften shadow edges?

Look at the filtering options on shadows, that should soften the edges a bit I think.