No announcement yet.

Problems with dynamic shadows

  • Filter
  • Time
  • Show
Clear All
new posts

    Problems with dynamic shadows

    Hey guys,

    I'm having this really annoying problem with the shadows of a pressure door that opens into 3 separate sections. Not entirely sure how to pull the dynamic shadows off correctly, and hoping someone can help me.

    I have the scene set up with a standard point light on one side of a wall, and no lighting on the other side. Each door section is set up as an InterpActor and I can set up the animation just fine - however when the doors close or are closed, the shadow cast into the room with no light becomes all warped. On top of that, lightmass seems to have cast some funky light - I understand that lightmass of course can't take dynamic objects into account since it's pre-baked - but maybe someone here can give me a few pointers on how to make it look decent.

    Here are images to illustrate my point:

    This is the unlit version, so you can see how the door looks and works

    And this is the lit version - I've highlighted the floor in order to make the shadows stand out more.

    Select your light and check box the dynamic channel in lighting channels, cast dynamic shadows, force dynamic light, and change the light shadow mode to normal.

    Then on your door check box "use precomputed shadows".


      Elude, I can't thank you enough, you simply saved my day - it works like a charm, though now I'm without the lightmass pre-baked lighting... How would I go about getting the best of both worlds, if it's even possible? Add another lightsource for lightmass?


        To get the lightmass I usually add a pointlight with a low brightness, around .1 or lower depending on how dark you want your scene. And I am not sure if it makes a difference but movable pointlights have everything already set up for dynamic lighting and I find that they give better shadows than having to turn off precomputed shadows.
        With Precomputed Still On

        Uploaded with
        Without Precomputed Shadows.

        Uploaded with
        Because the Precomputed shadows are turned off it isn't using the lightmass.


          By default use precomputed shadows for an interp actor is turned off, I was telling him to turn them on. Since his objects are moving objects rather then static objects like your tents which have precomputed defaulted to on, he cant use that method of dynamic lighting without issues like the image he displayed.

          Also by default moving lights are setup with modulate shadow mode which gives the illusion that the shadows they cast are illuminated which is what is actually causing his door image to appear the way it does, to counter this he would have to adjust the moving lights options using normal shadow mode.

          Since his doors move he cannot cast lightmass on it, if they had been stationary then yes, adding an extra light would do the trick, but the second the object moves it'll show up dark again in the shadowed spots.

          You can do one of two things here, add a second light like pulse said with a low brightness value, and then adjust your material on your doors to have an emissive glow to the texture they use. You will have to tweak the emissive channel of your material to match that of the static global illumination in your level so that it doesn't look out of the ordinary.

          The second thing you can do is add a skylight with a low brightness value and check box the dynamic channel aswell as force dynamic light. This will give you an ambient glow throughout your entire level on every object including moving objects, but if you wish for this glow to only be limited to your door and would like to use other random static lights around your level with lightmass then uncheck all the lighting channels on your skylight, and give both your door, and your skylight a unique channel that nothing else uses, like the unnamed channels.

          I hope this helps.


            Just to reply I turn the modulated to normal I use a point light to get the lightmass and in fact those shadows you are seeing are moving you just can't tell by the picture as I animated the light to simulate the fire it's not an illusion you see that there is lightmass there is lightmass. The shadows on the tents are not static. Nor are they static on the logs.
            With Pointlight

            Uploaded with
            Without Pointlight

            Uploaded with


              The tents animating and them moving with matinee are completely different though, you can cast dynamic shadows on a dynamic tree, and still get lightmass to work on it, but the second you move the entire tree much like a door, the lightmass that was once on it will disappear.

              Atleast this is from my own experience, I would appreciate anything that may say otherwise.


                thank you both for your replies, they've been a world of help.

                I ended up making 2 point lights, one dynamic at .25 brightness and 1 static with .75 brightness (that way I get a summed lighting strength equal to a single lightsource of 1.0)... This lets the lightmass shadows be visible in the scene, as well as shine the dynamic light into the dark room behind the door.

                However, both are fairly faint - I'd love to be able to have the static light be at full strength only for the lightmass calculations (off at game-time), and have the static light be at full strength as the main light source at game-time, so that their light intensity doesn't add up to an overly bright environment. Can this be done, or would I have to bake the lightmass effects into the textures? (god I hope not)

                Excuse the poor description, I'm somewhat at a loss for words, english isn't my primary language.


                  I've decided to construct my own little test level with a similar scenario because I was really curious as to what pulse was mentioning. Not to stray from the original topic but it appears you were right pulse, lightmass does indeed cast on full dynamic objects like a door. What I find odd though is if you move the door physically with your own hand in the editor, the lightmass on the given dynamic object goes completely black, losing any illumination it had from the build. However if you build the lighting after you've setup your animation in matinee, the illumination stays.

                  I guess this makes alot more sense of why I've experienced lightmass working on moving trees but not physical moving objects.

                  Back on topic, Phreon you might actually have to add a third light to get this to work properly. Setup one normal static light for your your environment and give it a low brightness value, then setup a second static light with only the dynamic channel selected in lighting channels, give this light an even lower brightness value.

                  Don't worry about averaging all the lights to equal a brightness value of 1, just adjust them until you feel comfortable.

                  Lastly the other thing you can do is adjust your material to be darker to match the illumination in your level.