Announcement

Collapse
No announcement yet.

DominantSpotLight + Landscape = Problems

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

    DominantSpotLight + Landscape = Problems

    Hi there!

    I have a pawn with a DominantSpotLight attached to it through a socket (something like a lantern). The light works perfectly in doors and around other static / skeletal meshes, creating great shadows. I was trying to create a small lake in the landscape, and wherever I "dig" in the landscape, the shadows just don't work, the part of the landscape that goes down is pitch black:



    Funny thing is, if I have the Landscape Editor active when I right click > Play From Here, the shadows work as they should:



    I am running out of ideas here, I've searched around the web and seen other people with similar problems, but am yet to find the solution. Here are my DominantSpotLightComponent's properties:

    Code:
        Begin Object Class=DominantPointLightComponent Name=FlashlightComp
    	    Brightness=1.0
    	    LightColor=(R=255,G=147,B=41)
    	    Radius=350.0
    	    FalloffExponent=3
           	    ShadowFalloffExponent=3
                LightAffectsClassification=LAC_DYNAMIC_AND_STATIC_AFFECTING
                CastShadows=TRUE
                CastStaticShadows=TRUE
                CastDynamicShadows=TRUE
                bForceDynamicLight=FALSE
                UseDirectLightMap=FALSE
                LightingChannels=(BSP=TRUE,Static=TRUE,Dynamic=TRUE,bInitialized=TRUE)
        End Object
        LanternLight=FlashlightComp
    Anyone have any idea what I can do to fix this?

    Thanks in advance!

    #2
    *gentle bump* :x no one has faced this problem before? No ideas left :\

    EDIT: Kind of fixed it, (in a very very nasty way) by going to the LandscapeComponent class on UDK and changing "CastShadow" to FALSE, since I don't need to have it create any shadows. If anyone has a cleaner solution, feel free to contribute

    Comment


      #3
      I've had issues with dynamic shadows and landscape as well. The geometry used for shadow casting seemed to not match the actual world geometry. Did you scale the landscape from its default settings? I believe this was the cause of the issues I had.

      Comment


        #4
        Originally posted by Arnage View Post
        I've had issues with dynamic shadows and landscape as well. The geometry used for shadow casting seemed to not match the actual world geometry. Did you scale the landscape from its default settings? I believe this was the cause of the issues I had.
        I did not scale the landscape, I kept its original scale. Still don't know of a *correct* way to fix this, but removing the shadows worked for me as I do not need the landscape to create shadows.

        Comment


          #5
          Hey there! I had what I believe to be the same problem; the only difference is that I was using a both a spotlightmovable attached to my player mesh in addition to a dominant directional light to represent a moon. Can you do me a favor and try setting your landscape's "Max LODLevel" to 0 and tell me if that magically "fixes" it?

          It seems to work for me, with the obvious problem that it completely disables LOD on the landscape, which is sad. Let me explain my reasoning for trying this: I'd speculated roughly the same thing as Arnage: that the geometry used for shadow casting isn't actually the geometry that was being rendered, and it occurred to me that the classic shadow mapping algorithm is based on rendering a depth-map from the position of the light. Obviously, with the light being attached to the player, there's no obvious reason why this should cause the depth map to be generated from a different LOD, but given that to my knowledge landscapes are the only thing in UDK that can effectively have different LOD's in different parts of the same "mesh" I thought there was at least some chance it was somehow using the wrong LOD from the perspective of the light. This is completely speculation, so there might be a completely different reason why this "fixes" it (which I'd love to hear), but it's why I tried setting the LODLevel, so take that as you will.

          Naturally it would be nice to have a better solution to this problem that didn't disable one of the main features of landscapes, since this seems to be a pretty serious bug, but in my case it was preferable to having the player's light basically not work at all.

          Hope this helps!

          Comment


            #6
            Well, at least in my level the November version of UDK has apparently fixed this problem. I'm curious about if this is true for others as well.

            Comment

            Working...
            X