Announcement

Collapse
No announcement yet.

Dynamic Shadows bleeding into other objects

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

    Dynamic Shadows bleeding into other objects

    I have some static meshes in my level that have alpha textures applied to them (such as trees and plants). In order to get the correct shadows for these i had to convert the meshes to Movers, so that the shadows were taking the alpha channel of the textures into account. This works, and i see nice shadows, however these shadows pass through any other meshes or terrain around them.

    For example i have a tree on a cliff, and part of the level running under the cliff. I also have a building behind the tree. The shadow is being cast on top of the cliff, underground on the floor below, on the building and inside the building. There seems to be no stopping it.

    Anyone know how i can fix this?

    #2
    you can't fix it, it's an odd bug that's come up over and over again. Do a forum search next time

    Comment


      #3
      I did, i searched for dynamic shadows came up with nothing useful that i could see So say it is a bug, what is the best way people have found to get around it? Should i simply convert the meshes back to the static type and put up with the non-alpha mapped shadows?

      Comment


        #4
        Its not a bug, it is simply the way it is, you have to design around that limitation.

        Comment


          #5
          It's not a bug. It's a "feature". Really, though, Oblivionbringa is right. It is just a side effect of using modulated shadows. If you really want a work around, you could always try using a decal or light function to fake the shadow by projecting a texture made to look like the shadow.

          Comment


            #6
            Ok, well according to Hourences tutorial on decals:


            "Decal Actors should only be used for those projections that have nothing to do with the lighting, such as graffiti, and not to, for example, project a spotlight or fan shadow like you used to do in UE2. For those effects, there are now Light Functions available, please see my Light Function tutorial for that."

            And then according to his tut on light functions:

            "Please note that Lightfunctions are a Dynamic Light feature. Any light with a Lightfunction will become Dynamic, obviously having quite an impact on performance. Use these sparsely! "

            Mr problem being i have quite a few alpha mapped trees and plants in my level and id like to get the shadows working properly for them, though using modulated shadows obviously has the above flaw/feature, decals apparantly shouldn't be used for shadows and light functions shouldn't be used too much! This is frustrating

            Comment


              #7
              Firstly, you dont need your trees to be movers to cast dynamic soft shadows, secondly dont use Modulate for casting your dynamic soft shadows, use Normal.

              Heres a run down on how I cast dynamic soft shadows on objects without them bleeding into eachother, and instead blending together like real shadows should.

              Place a static mesh in your level(yes a regular pure static mesh) and open up its properties. Under lighting uncheck bForceDirectLightMap and bUsePrecomputedShadows, then check bCastDynamicShadow, and then in lighting channels check Dynamic.

              Once you've setup your static mesh properties be sure to use a toggleable light that has bCastDynamicShadows checked and the Dynamic channel checked, and also as I mentioned before set the LightShadowMode to Normal instead of Modulate.

              Incase your wondering why I said to use a toggleable light instead of a move light or just a pure regular light heres the awnser... For some odd reason no matter the properties of a move light or regular light I happen to use, they dont seem to ever cast dynamic soft shadows after a rebuild like toggleable lights do with the right properties. This might be different for some, hopefully you dont have the problem I do.

              Comment


                #8
                I was just about to post here saying i figured this out I changed the light to cast normal rather than modulated shadows after ffejnosliw said they were related to it all and that sorted the problem with the shadows bleeding across the environment out.

                The whole static mesh rather than mover thing you mention doesn't necessarily apply to me. The only reason my meshes are set to movers is because they have alpha channel textures applied to them, and converting them to movers was the only way i found to get the dynamic shadows to take the alpha into account.

                I also don't seem to have the problem with the toggable/normal lights you mentioned, i have directional lights in my level and they cast the shadows just fine.

                Thanks very much for your help guys.

                Comment


                  #9
                  I'm not guna force this on you if its working now, but as I said, the trick that I use with static meshes seems to only work with toggleable lights with the right properties.

                  Heres a shot I took of a map I've been working on in Gears(works exaclty same way in UT3) displaying a dynamic soft shadow from a tree with alpha textures for its leaves.

                  [shot]http://img183.imageshack.us/img183/6583/dshadowgx7.jpg[/shot]

                  Comment


                    #10
                    I will try and convert the lights to toggable and the movers to meshes and see what happens, and i'll get back to you. If that does work it could be beneficial as (im just guessing though) id think movers were a bit more expensive than static meshes.

                    Comment


                      #11
                      A toggleable directional light should have the necessary default settings to cast a dynamic soft shadow, using that and the settings I used for the static mesh should give u some results.

                      I wish ya the best of luck, hope it works.

                      Comment


                        #12
                        Ah, stupid me i just checked, the directional lights in my map are toggable already. I hadn't however tried the settings with the static meshes that you just showed me and by setting them up that way the shadows actually do take into account the alpha textures on the meshes, so it works Bound to be better than having movers all over the place so thanks a lot for that

                        Comment


                          #13
                          It appears that after rebuilding the lighting, these shadows disappear

                          Comment


                            #14
                            Originally posted by PaulH84 View Post
                            It appears that after rebuilding the lighting, these shadows disappear
                            Ya I mentioned that, but for me at least if your light is a toggleable light they should stay after a rebuild, any other light type seems to disappear after a rebuild with this trick.

                            Comment

                            Working...
                            X