Home Unreal Engine

Dominant Light shadow is reversed?

polycounter lvl 9
Offline / Send Message
PatrickL polycounter lvl 9
watkb.jpg



This scene currently uses a single dominant directional light, and every prop casts a shadow just fine... except this bastard. It isn't -exactly- reversed, but as you can see, its shadow is definitely going in the wrong direction. Any idea what would cause it to cast like that?

The ground is a terrain.

Replies

  • Parkar
    Options
    Offline / Send Message
    Parkar polycounter lvl 18
    The terrain uses vertex lighting so this is most likely a precision problem. On the side close to the light you probably have a vertex just under the edge of the model so it will be in shadow while the vertex a bit onfront of it will be in lit. The edge of the shadow will be drawn halfway between those two vertices. Moving it just a bit closer to the light should fix it in this case. Or increasing the tesselation of the terrain.

    Edit: You can also adjust the sharpness of the shadows on the directional light to make the problem less visisble.

    Using a dominat light with dynamic shadows on nearby objects should work to. Don't rember what it's called but it should help when you get close enough to really notice it.
  • 3DRyan
    Options
    Offline / Send Message
    3DRyan polycounter lvl 8
    Yeah, I'd look into tessellating it more. As long as you've set up the environment to LOD properly, you shouldn't take a performance hit.
  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
    Parkar wrote: »
    The terrain uses vertex lighting so this is most likely a precision problem. On the side close to the light you probably have a vertex just under the edge of the model so it will be in shadow while the vertex a bit onfront of it will be in lit. The edge of the shadow will be drawn halfway between those two vertices. Moving it just a bit closer to the light should fix it in this case. Or increasing the tesselation of the terrain.

    Edit: You can also adjust the sharpness of the shadows on the directional light to make the problem less visisble.

    Using a dominat light with dynamic shadows on nearby objects should work to. Don't rember what it's called but it should help when you get close enough to really notice it.

    Actually the terrain uses distance field shadow maps. At least when it's lit up by a dominant light. http://udn.epicgames.com/Three/DistanceFieldShadows.html
  • ohnein
    Options
    Offline / Send Message
    Terrain by default uses a lightmap. There isn't a reason to up the tessellation of the terrain to get better lighting.

    In the terrain properties under Lighting there is Static Lighting Resolution and Is Overriding Light Resolution. Those two options will give you control over the resolution of the lightmap for the terrain. You can use the Lighting Only w/ Texel Denesity to see how big the pixals are in your lightmaps.
  • Parkar
    Options
    Offline / Send Message
    Parkar polycounter lvl 18
    Ahh, sorry about that missinformation.
Sign In or Register to comment.