Shadows Problem

Hi,

I have a ground and boxes above it, the boxes cast shadows on the ground

its working just fine, however when the camera steps over the shadows, the shadowed areas become bright and the unshadowed ones become dark :S!



does anyone have any idea about this problem?

As far as i know, its a limitation of the stencil shadow technique that is used.

You could try using the DirectionalShadowMapPass.



edit:

Or someone could implement depth-fail when the camera is inside the shadow :slight_smile:

thanks for your reply … ok i replaced the ShadowRenderPass with DirectionalShadowMapPass … i guess its working

do u know how can i darken the shadows?

look what i got (see the pic)

the shadows are very bright

Hmm i dont see any shadow casting on the floor, are you sure you have set it up correctly?

Take a look at TestDirectionalShadowMapPass to see how to set it up.



The Shadow implementations in jme really could use an update.

setShadowAlpha(float) can be used to darken the shadows. Try a value of .7f for instance.



I must say I find the DirectionalShadowMapPass quite ugly. It's very pixellated and playing with the shadowMapScale makes it act very erratically.



Agreed on the need for an update.

well yeah i followed that tutorial and its working, very ugly shadows though … I'd rather not use any shadows rather ruining my game look… if anyone knows any twist to use to make the RenderShadowPass work correctly please let me know …

thanks guys for your help :slight_smile: