Home Unreal Engine

Unreal Lighting Modular - Problem and general question

Dennis_Levi
polycounter lvl 4
Offline / Send Message
Dennis_Levi polycounter lvl 4
Hi guys,

I'm working on a sci fi lab for my school project and I'm currently struggeling with some lighting problems.
I have shadow issues on my wall moduls. I made some screenshots where u can see my problems, as well as my unlit and Lightmap view mode.




Unlit


Lightmap Density

Example 2

Lit

Unlit


As you can see I get some of these black stripes where the moduls connect to each other. I already set up the Light in the Word Settings to following set up:

I also tried it with "Static Lighting Level Scale" = 0.1, but that didn't helped.

As I'm already new to Unreal and Lighting can someone explain to me what "Static Lighting Level Scale" is doing exactly?

Can you also let me now what to do to smooth the shadow of the pipe (Example 2) perfectly?

Thanks a lot
Greetings Dennis

Replies

  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Static Lighting Level Scale only adjusts the scale which lightmass thinks the scene is, basically it's scaling up or down your entire level by that scale. 

    Most lightmass issues need to be addressed with the model and UVs, playing with settings isn't going to magically give you much better results. 

    Make sure your lightmap UVs are split at the hard edges. Don't over modularize your scene. Use meshes and details to cover up where seams would be with either intentional seams, or details like pipes, pillars, brackets. 


  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    ZacD said:
     Don't over modularize your scene. Use meshes and details to cover up where seams would be with either intentional seams, or details like pipes, pillars, brackets. 


    This will save you hours of frustration. There is a lightmapping issue in UE4 that can't be resolved no matter what you do. It means modular seams on clean pieces will give shading errors. No amount of fiddling with lightmap UVs will solve it. It's a known limitation of the engine and is stated by Epic.

    Another trick is to add a vertical bevel to hide the seam. It works well on sci-fi pieces.

    Often when you build lighting for your project and in indirectly lit areas you may notice that there is sometimes a shading difference between modular planar surfaces, typically walls, floors, and ceilings. This is an unfortunate side-effect of how static indirect lighting is handled at the moment and doesn’t have an easy way to fix. This can hopefully be made better in the future.

    Here’s the breakdown of the issue, if you’re not familiar.

    • Light hits a surface and then that light is bounced on the surrounding surfaces. This type of bounce light is referred to as Indirect Lighting. Some surfaces will be directly lit as well while still receiving some bounce, like the Wall that is partly lit fully and has some indirect lighting with the shading issue in the shadowed corner.
    What’s happening here is that each of these static meshes are sent to the CPU to be processed in the order they are received and on different CPU threads. This simply means that while each one has their lighting built by lightmass the others don’t know what the shading for the one before it would look like to reference the edges to make sure they match up. This leads to slight shading differences between each planar surface.

    So, by now, you’re wondering “What can I do about this?!”, right?

    In the World Settings under the section for Lightmass you can adjust some of the settings here to get better results.

    • Indirect Lighting Quality can be set to 2 or higher.
    • Indirect Lighting Smoothness can be set to usually a range of .65-.75. The lower the value here is though the more artifacts you can run into that make the lightmap look like it has blotchiness to it.
    • (Recommended only for Advanced Users!!) Static Lighting Level Scale can be adjusted to a lower value to get better blending as well. But this changes the scale of how lighting is calculated for the entire level. This will increase build times significantly if the value is lowered but will give you better results. This is commonly used by those within the Architectural Visualization field and not by those developing games unless they have a specific reason and understand the choice.

    When you adjust the quality of indirect lighting it’s always a good idea to lower the lighting smoothness to get better results. This helps blend better between these surfaces, but it doesn’t necessarily help remove the issue completely and can have other side-effects as well. You should really test it in project or a test map to fully understand what you’re adjusting here and why.

    There is also some steps you can take to reduce how noticeable this artifact is and steps you can take with the design of your project.

    • Try not to over-modularize your levels! This is important. You may think that making a moderately sized wall into nice smaller concise pieces that you can pack together like Lego’s is the best thing ever, but you run the risk of this shading difference happening, and you now have many more actors that add to draw calls and checks for the visibility states of these. It’s best to have have a single wall when it makes sense rather than many small pieces. You get reduced draw calls and less issues that can occur with lighting.
    • You can simply use other geometry to better hide these pieces where there would be seams, like columns or adjoining walls, or wall molding.

  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Also, Luoshuang's GPULightmass does reduce seams between meshes, but it doesn't support all of the features of lightmass. 

    https://forums.unrealengine.com/development-discussion/rendering/1460002-luoshuang-s-gpulightmass
  • Dennis_Levi
    Options
    Offline / Send Message
    Dennis_Levi polycounter lvl 4
    Thanks a lot for your super fast respond on my request!
    You helped to understand and handle it more efficient.

    I will check what will works best for my scene now and post it here.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    One of the things you can do to reduce seams with shadowmaps UVs is to line up the UV edges with the pixels of the shadowmap. 

    If you look at the 'lightmap uv' display you'll see that the seams on some of your meshes aren't lined up with the grid pattern in the display. If you made sure your UV's are lined up with the edge of the UV space where you might get a seam then you're less likely to notice the seam there. 
Sign In or Register to comment.