I am having a problem with shadows I don’t want appearing along the edges of my meshes, it is a lot more noticeable when the meshes are placed next to each other.
I measured the walls out so that they would snap together perfectly when using the grind in UE4 so they are technically clipping into each other a tiny amount, but moving them apart doesn’t do much to improve the problem.
I have tried a bunch of different things I have seen online to help, some things make it worse and others improve it slightly. I have tried:
Changing the Light mass settings in the World Settings.
Changing Lightmap resolution as well as Min Lightmap resolution and Light Map Coordinate Index.
Changing to different light sources as well as changing the movability of the light sources (Static, Stationary, Moveable): Changing lights to Moveable does improve it a lot but it also means I won’t be able to have that many lights in the scene close together.
The material / texture I use doesn’t change anything nor does changing the material to two-sided.
The mesh has good smoothing in Blender.
The only other thing I can think of is the UV’s. I have unwrapped them but I am not that great at knowing the best way to unwrap UV’s, if you have any tips on that, that would be great.
I am not sure how UE4 handles UV’s but there are 2 UV channels, 1 which is the UV I created and the other one auto generated?
The screenshots I have taken are from a new blank project with no changes to the default lighting settings. Although it looks the same as my other project with changed light settings.
I’d suggest you try reducing your min lightmap resolution, while also increasing your actual lightmap resolution.
Min Lightmap Resolution is used to determine how much padding will be placed around the lightmap UV islands when Unreal generates the lightmap UVs, if you set it too high then you’ll get texel bleed from the adjacent islands, this is mainly noticeable at lower mips. In general you want it to be quite a bit lower than your actual lightmap res.
That seems to have improved it a lot but there are still some sharp lines on the top and bottom of the seam.
I messed around with a few values and edited the UV’s a tiny bit. It has improved it a lot but the shadows are a lot more sharp. My lightmap resolution is set to 512 and min lightmap res is at 16. I am going to keep changing the values.
It could be that this is not a Light Maps issue, but Ambient Occlusion.
The Ambient occlusion is a shadow that is generated by the proximity of objects. I don’t know if it is activated from the beginning, but you can deactivate it from a scene using a Post Process.
16 is probably way too low for min res, I wouldn’t go below 64. I would expect 64 min with a 512 lightmap to produce the same results. The minimum resolution is basically a balancing act, you want it to be as low as you can get it while still getting good results, but you don’t want it to be too low or you’ll be wasting too much of your texture space on padding.
Your remaining artifacts I’m guessing are probably related to how you laid out your UVs, I’m guessing you did not create a UV seam on the edges that are still showing lines, and so you’re getting bleed from neighboring texels.
It’s hard to understand your UV layout but I assume you need to break these off into their own UV islands:
I changed the UV’s and created a UV Lightmap in Blender. It has got rid of the shadows but there is a clear seam between the meshes and 1 appears to be a different shade than the other. Could this be a separate issue?
That’s a crazy amount of UV islands for such a simple mesh… You should probably merge a lot of those if you care at all about efficiency… Every UV seam doubles the vertices along the seam.
Yes, your new issue is just an artifact of how lightmass works. Basically it has to process each mesh on a different thread that doesn’t have information about what the other threads are doing, so you end up with discontinuities in the lighting. You can read more about it here but unfortunately all the images are missing as they didn’t survive the forum migration.
There are 4 main ways to deal with this:
Use higher quality lightmass settings (will have a huge impact on your light build times, especially in complex scenes).
Design your mesh pieces in a way that the seams won’t be noticeable
Merge the meshes where the seams are occuring into a single mesh. This will ensure Lightmass treats them as a single mesh. Lightmass won’t be able to distribute its work as efficiently if you do this, but it’s still most likely going to be way faster than using higher quality settings.
Use GPU Lightmass instead of CPU lightmass. It doesn’t suffer from this issue. But it is still in development and is missing a lot of features, especially if you are in UE4. It also requires a raytracing capable GPU.
Some examples of higher quality settings and their results (including the light build time on my 3900x):
The UV map that you pointed out was the UV Lightmap, is that not how lightmaps are supposed to work - Each of the UV faces separated. If not what would be the best way to make a better UV Lightmap?
You don’t want to separate every single face into its own island, you only want to split faces where it makes sense to place a seam, usually on hard corners for example.
It looks like you’re just auto-unwrapping your mesh, I would highly suggest you invest some time in learning how to create a proper UV map in general for whatever modeling program you’re using, as most of the same rules apply. The primary difference for lightmap UVs is that you cannot have overlapping UV islands.
Yea I understand how to unwrap in 3DS but I am using Blender for this and from what I can find it doesn’t have nearly as many tools as 3DS for unwrapping (hopefully I am missing them). A lot of the recommended plugins are either not in the Blender plugin library or the store page to download them has shutdown.