Home Unreal Engine

Light Map horrible shadows

polycounter lvl 9
Offline / Send Message
Chase polycounter lvl 9
LHrIiCm.png
sP57SZY.png
OCZ4QzZ.png

Light map density.
McMlDK5.jpg
dN0XImz.jpg

I've made all my light maps with even padding, no overlapping or inverted faces. I made sure the light map density is even throughout the entire scene before exporting. These shadows were a result of having what I figured to be too low light map res. Like around 128. So I bumped everything up so the average was around 500 res. Now my pc won't render so I can't tell if this will have made a difference. I have to be doing something wrong for these shadows to be so crappy in the first place. My original issue with light maps was figuring out if a mesh's light map uvs needed to take up the entirety of the uv space or not. I found out it doesn't because it will throw off the texel density between it and surrounding meshes. Udk will just combine the uvs anyways. Where do I go from here? I turned off light map compression and turned up static lighting to 20 in the world properties. Completely befuddled.

Replies

  • Arnage
    Offline / Send Message
    Arnage polycounter lvl 10
    Based on those screenshots and you description I don't think the problem is with either resolution or compression. Instead it is probably caused by the quality of the lightmass calculation itself.

    To create area shadows lightmass simply calculates a large number of regular (sharp) shadows at various point inside the lights volume. (Or at various slightly different angles in the case of directional lights) This process is kind of slow, so when you lower the quality setting of lightmass it will use a lower number of shadow samples per light, causing these kind of artifacts. If you raise your lightmass quality to production these artifacts should be fixed.

    If you can still see them afterwards you can manually override these settings in your lightmass.ini by raising NumShadowRaysScale for point and spotlights and NumPenumbraShadowRaysScale for directional lights, but this will obviously come at a cost to your rebuild times.
  • Chase
    Offline / Send Message
    Chase polycounter lvl 9
    Arnage thank you for the reply! I was meaning to get back to replying to you but with the holidays and everything going on it just slipped my mind. I was able to get the issue semi sorted out. I didn't need to have my texal density as high as I did. I dropped everything back down in half. Somehow or another most of the shadows just miraculously fixed themselves. I had previously increased the number of photons, but maybe it was just adjusting the light map res again. I don't know haha. Anyways, thanks for the detailed reply on everything!:thumbup:

    mD3fBhd.jpg
  • Arnage
    Offline / Send Message
    Arnage polycounter lvl 10
    Chase wrote: »
    Arnage thank you for the reply! I was meaning to get back to replying to you but with the holidays and everything going on it just slipped my mind. I was able to get the issue semi sorted out. I didn't need to have my texal density as high as I did. I dropped everything back down in half. Somehow or another most of the shadows just miraculously fixed themselves. I had previously increased the number of photons, but maybe it was just adjusting the light map res again. I don't know haha. Anyways, thanks for the detailed reply on everything!:thumbup:

    Don't worry about it, glad to have helped. This effect is actually exacerbated by very high resolution lightmaps, as you can more easily spot the individual outlines of the separate shadows that together form the penumbra, so I'm not surprised lowering the resolution a bit helped in your case.

    Another thing to watch out for in an indoor environment with large area lights: make sure no shadow casting geometry is inside the light's radius. This can also cause some ugly shadow artifacts.
  • Chase
    Offline / Send Message
    Chase polycounter lvl 9
    I think I understand what you mean about how shadow casting geometry should not be in the lights radius but can you expand on that?
  • Arnage
    Offline / Send Message
    Arnage polycounter lvl 10
    Chase wrote: »
    I think I understand what you mean about how shadow casting geometry should not be in the lights radius but can you expand on that?

    Sure, here's a quick sketch of a light that is placed close to a ceiling to illustrate:
    ObjectWithinRadius.png

    The white dot is the lights location, the white circle is its radius. The brown line is the ceiling.

    Now lightmass will start to generate shadows, to do so it will take various samples within the light's radius. All the grey samples will work just fine, however the red sample will look at the other side of the ceiling and generate a, probably unwanted, shadow sample inside the room.

    Even if this is your intention (Maybe you have a long fluorescent light going through multiple floors) it would be better to divide the light into multiple pieces per floor because otherwise nothing would be fully lit and everything would be part of the shadow's penumbra, requiring a huge amount of samples to get clean shadows.
Sign In or Register to comment.