Announcement

Collapse
No announcement yet.

[SOLVED] Enable / Disable DominantDirectionalLight error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Enable / Disable DominantDirectionalLight error

    Hi there!

    I have a DominantDirectionalLight on my level which simulates the sunlight. The level is played mostly without this light enabled and it is only enabled by the end of the level through UnrealScript (LightComponent.setEnabled(true)). The problem is, as soon as that line is read, the light turns up, as it should, but the message "LIGHTNING NEEDS TO BE REBUILT" shows up in red in the corner. Only when it gets enabled. This happens even on the final cooked game. Any ideas how to make this work? The light NEEDS to be disabled for the majority of the level, there's no way around that.

    Any help would be appreciated, I'm sorry if something of the sort has been asked before. I searched but couldn't find anything relevant.

    Thank you in advance.

    #2
    You can't use that light, you need either a toggleable light or an interpolating light

    Comment


      #3
      Originally posted by darthviper107 View Post
      You can't use that light, you need either a toggleable light or an interpolating light
      Thanks a lot darthviper107. I replaced it with a Dominant Directional Light Movable and it did the trick. My shadows were very blocky though, so I raised up "Whole Scene Dynamic Shadow Radius" and "Num Whole Scene Dynamic Shadow Cascades" and it looks great now. The only problem I have right now is that my InterpActors / Movers are casting pitch black shadows (I have an extra directional light for ambient light so the rest of my shadows are not pitch black). Any ideas? Sorry for all the questions, I've been so focused on UnrealScript these last few months that I completely looked over the rest of the editor lol!

      Cheers & thanks in advance

      Comment


        #4
        Moveable will use only dynamic shadows, which don't always look good. If you need good lighting and the light itself isn't moving, use a toggleable light.

        Comment


          #5
          Originally posted by darthviper107 View Post
          Moveable will use only dynamic shadows, which don't always look good. If you need good lighting and the light itself isn't moving, use a toggleable light.
          I tried a toggleable light, but it didn't create any real-time shadows (which I do need). This one works pefectly, only problem I really have is that the movers have pitch black shadows.

          EDIT: Nevermind I had to add "CastShadows=false" to my ambient light. Somehow it was overriding interpActor's shadows or something. It's all fixed now! Thanks a lot again!

          Comment

          Working...
          X