[SOLVED] Shadows make model black


I created some shadows for my game by using a DirectionalLightShadowRenderer. I noticed that models which cast shadows are getting black on the “shadow-casting” side. For better understanding I made a screenshot for you:

My player model casts and receives shadows. But the same happens for all other models which casts shadows such as trees, palms etc.

It get better by setting my AmbientLight to a “stronger” white but the scene then just looks way to bright.

Is there an easy way to say “Hey shadow, please don’t cast yourself on me”? :blush:

Best regards

1 Like

I think the diffuse color on the material is set to grey by default. Try setting it to white.

Edit. Im wrong. I looked at the code. Not sure where i got that from.

1 Like

Hmm… I tried this but this unfortunately did not have a noticeable impact.

However, I changed same values (AmbientLight, ShadowIntensity). It looks okay now.
I also tried setting renderer.setRenderBackFacesShadows(true);. This was great at the first sight but I later noticed some weird artifacts…

1 Like

try shadowRenderer.setRenderBackFacesShadows(false)


Ääähh, yes, sorry. In my earlier post I meant (false), not (true), sorry.

But hey, thanks, after some more parameter tweaking, I got some good results:



JME Shadows rock!

Thanks :heart_eyes:


Thank you. It’s not that often that I hear that… :slight_smile: