How to change the intensity of shadows for directional light

Hi everyone, I’m new to using Castle Game Engine.
For the moment I’m not creating any game in particular but I’m just doing some tests. I have a problem with shadows. once the directional light is placed it projects shadows that are too dark on the model.
I’ve looked through the settings but I don’t seem to find anything that will let me change this parameter. some advice?


The current shadows (both implementations – shadow maps, shadow volumes) indeed mean that the light is blocked completely. This kind of follows reality (well, a subset of what happens in reality) – when the light is blocked, and it’s the only light source, then the object is completely black.

The simplest solution is just to introduce another light, without shadows, with low intensity, that will make those black areas “a bit brighter”. You can see example of this e.g. in our examples/shadows/ demo ( castle-engine/examples/viewport_and_scenes/shadows at master · castle-engine/castle-engine · GitHub ). I use this trick in almost all examples where I employed shadows – 1. bright light, from above, with shadows=true, 2. a secondary, dim light, without shadows.

Here are 2 screenshots showing the process.

  1. One light, with shadows. Shadows are super-black.

  1. Added second light, to make things a bit brighter.


  • What happens in reality is that light “bounces” from one surface to another, so usually some light reaches every corner, and things are seldom really really black. (but CGE display doesn’t do this “bouncing” aka “global illumination”).
  • We also seldom have exactly literally only one light source in reality.
  • We plan to support environment lighting (here are my internal notes how to implement it using X3D nodes, Image Based Lighting (EnvironmentLight node) · michaliskambi/x3d-tests Wiki · GitHub ), this will then become best to simulate “daylight sky light”.

Thanks a lot! I will try this method.