Home Unreal Engine

[UE4] Emissive lighting artifact

vertex
Offline / Send Message
rosenand vertex
Hello. I'm doing a night city scene in UE4. I have two buildings with emissive materials, and between them a road, made from two parallel objects. As such, those two road segments are seamless, but when I build static lighting, the road on the left seems to catch more of the red light, and the road on the right catches more yellow, which creates a visible seam between them.

Changing viewport quality and built lighting quality doesn't solve this issue. Please help.

Replies

  • Snight
    Options
    Offline / Send Message
    Snight polycounter lvl 16
    This is a lightmap issue, because emissive lighting is static only. Few things you could try:

    1. Increase the lightmap resolution on these meshes. Check the padding of the UVs.
    2. Make the road 1 mesh instead of 2.
    3. Use stationary lights instead of using emissive lighting. You can turn shadows off for something this dim to make it cheaper.

    Hope that helps!
  • rosenand
    Options
    Offline / Send Message
    rosenand vertex
    Hello, thank you for your answer. Of course I considered 2 and 3 as alternatives, but I was hoping there would be a solution instead of an alternative. I increased the lightmap resolution to 256, and also changed the mesh from a long rectangle to a single square (so even more lightmap pixels per mesh, if I understand how lightmaps work), but that doesn't solve the issue. As for padding, again I don't fully understand the lightmap options in UE4, but I set "Light Map Resolution" to 256 under Static Mesh Settings, and "Min Lightmap Resolution" to 64, under LOD0 settings. This seems to introduce a bit of padding on the sides when I preview UV channel 1. But again, the UVs are just a square (well, two tris).

    And even if I make a bigger mesh, for the whole width of the street, the meshes will have to end at some point, I mean I can't use one mesh for all the streets on the map, can I? Does that mean that lighting a map with emissive light is impossible in UE4?
  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    are you letting the engine create the light map UV's ?
  • rosenand
    Options
    Offline / Send Message
    rosenand vertex
    I did, then I didn't, and it's all the same. We're talking about the UVs of a SQUARE...
  • repete
  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    I tried to recreate your issue this morning but it's working at my end. I used the basic floor mesh from the starter content and scaled it down to make 2 sections then added 2 cubes with emissive lighting, no seam visible after lighting bake, add some thickness to your floor/road and see if it helps.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    repete said:
    I tried to recreate your issue this morning but it's working at my end. I used the basic floor mesh from the starter content and scaled it down to make 2 sections then added 2 cubes with emissive lighting, no seam visible after lighting bake, add some thickness to your floor/road and see if it helps.
    Just tried an identical test and it also worked with no issues.
  • rosenand
    Options
    Offline / Send Message
    rosenand vertex
    I'm still getting seams. Just to be sure we're on the same page:

    1. File -> New Level -> Default
    2. Alt-drag the floor object with grid snapping set to 100, so that there are 2 adjacent pieces.
    3. Create a material with a Constant3Vector set to a bright color, multiplied by 8, linked to the emissive input. Duplicate with a different color.
    4. Drag a basic cube onto the floor object, set first material, alt-drag a second cube onto the second floor object, set second material.
    5. Turn on the "Use Emissive for Static Lighting" parameter of both cubes.
    6. Build.

    Probably something stupid I'm missing. Thank you for your time :)

    Edit: in the picture, the cubes are upsized a bit, just to be precise, but I tested it without resizing and it's still the same.


  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    The "Use Emissive for Static Lighting" setting is causing the issue. Your best option or workaround is 2 point lights set to static using the same colors:



    Cheers  
  • rosenand
    Options
    Offline / Send Message
    rosenand vertex
    I got my answer on the UE4 AnswerHub, the trick was to lower Static Lighting Level Scale in World Settings/Lightmass Settings.

    The guy who helped me also posted two interesting links about creating UVs properly for such modular assets, and about tweaking Lightmass further. Here's the link to the answer: https://answers.unrealengine.com/questions/392322/lighting-a-scene-with-emissive-lightmap-seams.html
  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    Nice tip :) glad you got it sorted !
Sign In or Register to comment.