Hi, I'm currently working an an ArchVis project and I'm trying to achieve the most aesthetic and believable results from the lighting bake. However I keep getting black seams at my wall intersections no matter what I do. What can I do to fix this and avoid this in the future?
My walls are UV mapped and I made sure that the Lightmap resolution is sufficient. SSAO is turned off so all we are seeing is the lightmass bake.
I read that I can align my lightmaps by laying out a UV Grid in 3DSMax and dividing 1 by the wall resolution, then snapping all the vertices to the grid. This is a pain in the ass to do for all the walls and I found that it still doesn't align quite right. Even if it did snap correctly, what would I do if my wall still has to intersect with a separate mesh? I cannot break my wall into 10 pieces because that would cause uneven shading and break the lighting even more.
Could it be my Lightmass settings? How can I fix this? please help
There's a setting in lightmass called "lighting scale". I remember setting it to a really small number (or half of the default) and that helped mitigate that issue.
Be warned however, it increased light baking times BY A LOT. However, it helped smooth out a lot of shadows because you're tricking the engine to render using short distances instead of long ones.
I also would try using more lightsources. Even though UE4 already has a sun and sky system, I don't believe it's powerful enough on its own to render scenes with greater accuracy like you could in an offline renderer like Mental Ray.
Edit: Here was the settings I based my lightmass off of. It was from the early days of UE4 so I'm not sure how much has changed since then. I also played around with the base .INI files.
You could also check out this post on the UE4 forums which also gives examples of tweaking the .INI files.
Thanks for the suggestions, I will increase my lightmass settings and see if that helps. The previous screengrabs were built on High settings Light quality. I have tried production quality and the result was better indirect and smoother lightmaps, but the black edges have remained and even became more prominent on some walls.
My walls are all flush and snapped to each other and do not intersect inside each other.
Here are my current lightmass settings ( Note: I am using Luoshuang's Multi Bounce Skylight)
I'll try increasing the settings even further and see if that fixes it, but I cant help but feel that the problem is with the lightmap UV's not lining up with the connecting walls/ceilings.
Here's an further example of the way I have my scene set up:
Exterior Wall as 1 piece
Same wall on the inside, connecting with the interior wall. You can see the ugly black line where the walls connect. They are 2 separate meshes. This is on a production build with the light-mass settings I posted above.
I have heard the ways you connect the wall can matter.
The only reason I can think of that this would be the case is because in the first example the lightmass engine is treating the top wall as 1 face - even the part that overlaps. Unsure about UE4 but I know unity and source behaves funny in this way, doing it's best to light the entire face as one. In the second example the face ends where the edge ends.
The left example is what I used. I took walls and ceiling and placed them very close to each other.
I'm still thinking it might be the actual lightsources. The reason why AO/shadows shows up is because when light enters the scene, there's not enough bounces happening, and you end up with creases that are filled with shadows instead. Looking at the white vase in the corner shows that being closer to direct lighting gives more info for the engine to work with.
It may not be physically accurate, but throwing in a spotlight and turning off the inverse square and cast shadow option, and use it to simulate an extra sky or sun bounce might solve the issue. Also, if the windows have glass, you may or may not have to put the spotlight inside. That's something I learned to help cheat past the engine.
When modeling buildings, unfortunatelly seams and things like that do happen in ue4 and it is unavoidable. First of all you need to make sure that your walls are thick enough otherwise there might be any kind of bleeding. But in cases like this house, you need to model the whole thing together, or place some kind of column over it to cover those seams.
Also you can reduce this effect by using reflection spheres, at the very least your dark lines will not be THAT dark.
After some experimenting, I noticed that increasing the Lightmass quality (Indirect Lighting Quality, Static Level Scale) did not help much with removing the black edges.
I got much better results however when I started aligning my second UV channel to the grid, which pretty much confirmed my suspicions that the issue was coming from the lighting texel grid alignment. Im starting to think that the lighting texels in Unreal that dont line up with the wall perfectly will get incorrect shading.
Have you tried adjusting your Radius on your Ambient Occlusion? You can also try intersecting your walls by pulling the mesh into the other mesh at the intersecting points. (not always great but it will create a shadow line that is not on the edge of the face which could correct the issues.) best of luck.
Hi guys, this is a known issue in 4.18 with the new lightmass improvements - I've been following the main 4.18 lightmass thread, and there seems to be a couple of workarounds for this problem - check it out
Replies
Be warned however, it increased light baking times BY A LOT. However, it helped smooth out a lot of shadows because you're tricking the engine to render using short distances instead of long ones.
I also would try using more lightsources. Even though UE4 already has a sun and sky system, I don't believe it's powerful enough on its own to render scenes with greater accuracy like you could in an offline renderer like Mental Ray.
Edit: Here was the settings I based my lightmass off of. It was from the early days of UE4 so I'm not sure how much has changed since then. I also played around with the base .INI files.
You could also check out this post on the UE4 forums which also gives examples of tweaking the .INI files.
https://forums.unrealengine.com/development-discussion/architectural-and-design-visualization/60547-lets-make-lightmass-epic-and-understandable?p=579561#post579561
https://forums.unrealengine.com/development-discussion/architectural-and-design-visualization/60547-lets-make-lightmass-epic-and-understandable?p=580383#post580383
My walls are all flush and snapped to each other and do not intersect inside each other.
Here are my current lightmass settings ( Note: I am using Luoshuang's Multi Bounce Skylight)
I'll try increasing the settings even further and see if that fixes it, but I cant help but feel that the problem is with the lightmap UV's not lining up with the connecting walls/ceilings.
Here's an further example of the way I have my scene set up:
Exterior Wall as 1 piece
Same wall on the inside, connecting with the interior wall. You can see the ugly black line where the walls connect. They are 2 separate meshes. This is on a production build with the light-mass settings I posted above.
The only reason I can think of that this would be the case is because in the first example the lightmass engine is treating the top wall as 1 face - even the part that overlaps. Unsure about UE4 but I know unity and source behaves funny in this way, doing it's best to light the entire face as one. In the second example the face ends where the edge ends.
I'm no expert just spitting out ideas.
I'm still thinking it might be the actual lightsources. The reason why AO/shadows shows up is because when light enters the scene, there's not enough bounces happening, and you end up with creases that are filled with shadows instead. Looking at the white vase in the corner shows that being closer to direct lighting gives more info for the engine to work with.
It may not be physically accurate, but throwing in a spotlight and turning off the inverse square and cast shadow option, and use it to simulate an extra sky or sun bounce might solve the issue. Also, if the windows have glass, you may or may not have to put the spotlight inside. That's something I learned to help cheat past the engine.
Also you can reduce this effect by using reflection spheres, at the very least your dark lines will not be THAT dark.
I got much better results however when I started aligning my second UV channel to the grid, which pretty much confirmed my suspicions that the issue was coming from the lighting texel grid alignment. Im starting to think that the lighting texels in Unreal that dont line up with the wall perfectly will get incorrect shading.
example: http://www.worldofleveldesign.com/categories/udk/udk-lightmaps-02-uv-techniques-and-how-to-create-second-uv-channel-in-maya.php
still not entirely sure how to fix it completely because some of the wall texels in my scene are not aligning properly still