Home Unreal Engine

UE4 and Lightmaps... I am so done :(

polycounter lvl 3
Offline / Send Message
kdobkowski polycounter lvl 3
Hey everyone,

I've spent the last few good hours researching lightmaps for UE4. I have found some useful info such as:

1) UE4's compression algorithm for lightmaps is using a 2 pixel border for interpolation so you need padding...
2) Your islands should be (as much as possible) be perfectly aligned on the grid.
3) For 128x128 lightmap resolution your UV grid should be divided into spaces of 1/128... The formula is -> 1 / target lightmap = texel grid spacing.
4) Having too little spacing between islands will cause light bleeding and artefacts...

With all of this in mind, I made few modular walls for my scene.
Here are the screenshots of my models and their lightmaps:

WALL:


DOOR SECTION:


WINDOW SECTION:



And these are my lighting settings in UE4:


The resolution of lightmaps I'm using for each of the models in the engine is overwritten to 128 and I'm using channel 1 of UV for lightmaps which is the one I created in Maya.

Now the problem is I'm still getting seriously stupid results :neutral:

Here are the results...



Another one...



At this point I'm ready to jump out of the window, after researching this for the past 4 or so hours...
Anyone could tell me what I'm doing wrong? :( 

Replies

  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Don't waste anymore time on it mate. This is a known issue caused by baking maps on multiple CPUs. Each thread is assigned a setion of the map and seams and some bleeding are inevitable and can't be solved. I spent so much time on this shit myself a few years back. All that hocus pocus hacking you mentioned amount to nothing. It took me a long time to find out that the CPUs are causing the issue.

    My advice(if you don't want to use dynamic lights) is to run the GPU baker.  https://forums.unrealengine.com/development-discussion/rendering/1460002-luoshuang-s-gpulightmass

  • kdobkowski
    Options
    Offline / Send Message
    kdobkowski polycounter lvl 3
    Don't waste anymore time on it mate. This is a known issue caused by baking maps on multiple CPUs. Each thread is assigned a setion of the map and seams and some bleeding are inevitable and can't be solved. I spent so much time on this shit myself a few years back. All that hocus pocus hacking you mentioned amount to nothing. It took me a long time to find out that the CPUs are causing the issue.

    My advice(if you don't want to use dynamic lights) is to run the GPU baker.  https://forums.unrealengine.com/development-discussion/rendering/1460002-luoshuang-s-gpulightmass

    I read someone was actually taking the modular bits and using Developer Tools -> Merge Actors to force rendering on same core.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Not sure. Haven't looked into it in a while. I've been using the GPU baker. Roll on the day when dynamic lights are equal/better quality than baking and we can finally say f@@K off to lightmaps! ;)

    Unless you're doing clean/crisp arch-vis work then a lot of those bleeds will be hidden by texturing.
  • PixelMasher
    Options
    Offline / Send Message
    PixelMasher veteran polycounter
    you can fix this by snapping the verts your lightmap UVs to the UV grid in your software package thats what worked for me in a similar situation.
    but in general, these errors are not even noticeable once you get some textures in the scene. you will never see those errors on a brick or grungy plaster texture. also 128 lightmaps for a mesh like that is way too high for gamedev, something like 16-32 is more realistic in most cases. maybe even 8 if it was for a console game.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    On the screenshots it looks like his verts are snapped. Also, In a clean environment such as an arch vis scene, sometimes you have to have such clean walls. Lets be honest, lightmass simply sucks with the default settings, and sometimes even with some tweaked settings. Currently we are fighting other kind of lightmass abnormalities. Even if you have proper understanding of how to get around this shit, you can have hard time with it. Lightmass should really get an update...
Sign In or Register to comment.