No announcement yet.

Directional Lights not casting shadows

  • Filter
  • Time
  • Show
Clear All
new posts

    Directional Lights not casting shadows

    Hi guys,

    I'm using two dynamic directional lights, but I absolutely cannot get them to cast shadows. Any ideas?

    Ideally, I'd like to be using two dominant directionals, but this does not seem to be possible, as if there are two, only one will be used to light the scene.

    Edit: Copy+pasting lights from another map works fine, but I can't seem to just use the same settings and get the same results. How mysterious, haha.

    Alright, nice and tested, here's the deal:

    1) Directional Lights will not cast shadows, at all. Two directional lights cause the correct *lighting*, but there is no shadowing.

    2) Dominant Directional lights will cast shadows, but meshes will only ever be lit by one light. Shadows also do not take into account the other light. This means that you get meshes that are fully lit by one light or the other (but never both) and when you get an area of shadow cast by either light, it is always fully dark.

    I went back and checked this in Unreal Tournament 3, and using directional lights as intended works absolutely fine for our intended purposes, we get objects lit by both lights, and we get shadows cast by both of the expected colours (and not fully dark).

    Does anyone have any suggestions? This is a design critical aspect of the game and cannot be dropped. Somewhere along the lines, changes to the lighting system have made using the deprecated old directional lights largely useless, which is undesireable when you have more than one light source.

    Amusingly, I can get the results I want with the preview lighting in the editor, but I am not able to get this when lights are built, which is quite frustrating.


    That's what I'm after. In game, two dynamic directional lights, dynamic shadows. If it can work in the editor preview lighting comfortably, there's got to be a way to do it in game.


      If you use a standard DirectionalLight, try enable bForceDynamicLight and change shadow type to Normal (instead of modulate). I've noticed that if bForceDynamicLight is off the dynamic shadows from directional lights tend to disappear at close distances.


        Using only those two settings, and disabling 'Use Precomputed Shadows' does look like it may do the trick. I'll try it on a more complex scene in a minute.

        Edit: Looks like it's working to me. Thanks!


          You're more than welcome.