Weird shadow bleeding

Hi there, recently I’m suffering of a terrible shadow bleeding in the corners of crown moldings. I read almost everything here for one year before opening this topic but I couldn’t fix this problem, I only decreased it with the time but my dream would be to fix it once for all. I have already unchecked cast shadows and the meshes are made by me in 3dsmax and are not overlapping or extending one onto the other. The lightmap resolution in this pic is set to 1024.

I upload a pic to show you the problem.

If I turn off the ambient occlusion the bleeding is almost gone.

Thanks for you help guys.

so nobody that has a solution for this?:frowning:

What are the export settings from 3DS Max? and what are the import settings in Unreal?

Thanks for you answer!
These are my export/import settings.

My suggestion is turn the static lighting level scale down to 0.5, which makes more accurate lighting at the cost of requiring a higher global illumination quality, that or you could find a way to remove the seam there on a seperate uv for lightmaps only.

Actually I bake light at 0.5 :frowning:

The bleeding is really subtle and not really noticeable from medium distance, but I really wanted to understand what was the problem behind it. If you can see, on the pic I uploaded from 3dsmax, the edges are perfectly aligned and not overlapping. And I also removed cast shadows to avoid one mesh castign the shadows onto the other.

I thought it was a easy fix but honestly I have no idea:(.

The funny thing is that when I have the opposite corner (pointing outwards) I don’t have this problem. Check here.


Could you show us the lightmap uv of the problematic mesh? Do you exclude the hidden/not visible islands? Do you pixel snap your islands?
…0.5 is still only half a centimeter accuracy…
Turning off casting shadow will cause inaccurate lighting imo…

So you’re applying the material(s) in UE after import? The import settings show the Textures / Materials is disabled. It’s not that it’s a bad idea to do so, but it could help in identifying the material made in UE as having problem(s). Another potential cause is the LOD, and yet another is the mesh distance field of one or more of the meshes in question. I don’t see how 0.5 level scale would yield accurate results everywhere else in the scene except the one corner, but I suppose it’s possible. You shouldn’t have to reduce your static level scale to 0.1 simply to get rid of an artifact in the corner while everything else displays well. I’m not disagreeing that it’s a potential cause, but simply stating how absurd it is to fix an artifact by using what’s become a standard which is rather divergent from the engine’s other capabilities too. I’ve had no artifacts of the kind on a likely slower and less RAM / graphics capable computer without lowering static level scale to 0.1 or even 0.5, and in fact have encountered artifacts by doing so. When you lower level scale, it is commonly thought that quality should be increased and smoothness decreased by a certain amount (to 0.6-.75), and I’ve seen the video and read through the Powerpoint presentation about it. It was an example scene which could be quite different from lots of other archviz scenes, and I’ve heard that increasing smoothness with lowered level scale is effective at getting good results too. So, it’s important to be wary of being so frugal with adjusting World Lightmass settings, not knowing in particular how it’s going to affect the scene with its other settings for the lights, materials, and post process. In other words, erring on the side of caution is probably a better approach.

I really think you’re much better off checking the material(s) and meshes of the problem corner there in terms of LOD settings, distance field representation, and adjusting ambient occlusion in its various types to try and fix it. The outer-facing corner is probably not an issue because it doesn’t have ambient occlusion attempting to account for a difficult to calculate area. The inner corner is receiving no occlusion other than how the corners of the walls and ceiling meet, so the potential is there to get insufficient ambient occlusion calculation, resulting in the distorted shadow.

As far as UVs, you can try disabling “Generate Lightmap UVs” on import, and then generate the lightmap for those meshes in the UE mesh editor after re-importing. You need to re-import because the lightmap UV data is attached to the ones that were imported and are used in the picture. I don’t see all the import settings in the screenshot. Are there more when importing those meshes, or is that the entire dialog of settings you saw?

Thanks for all your answers and help.

So far I tried, baking at 0.1 but nothing changed only building time. Cranking up the lightmap resolution to 2048 which resulted slightly better but the problem is still there. Using the lightmap I created in 3dsmax and the one automatically generated bt ue4, but the problem is still there.

I also cracked up the indirect intensity of some spotlights to be sure that the room was fully lighted.

I seriously have no idea. This happens to me only with crown moldings.

Maybe my lightmaps are messy I don’t know.

I upload a pic of what I do in 3dsmax

Talking about the material is a really simple one that I called white_matte to test this problem.


It looks like the crown molding’s edges go a little past the boundary of the lightmap. The light green highlight of the two pieces is inside the dark border around the lightmap. For lightmaps, that is incorrect. Shrink the length of the pieces so they’re well inside the border by at least 5 pixels and see if it solves or improves the result.

Ok, your lightmaps are wrong! And they are causing the problem!
And since the islands taking up only 1/20 of the whole place that’s with a 2048 res lightmap gives around 100 pixels? That’s VERY low!!
You have 2 options: either break up the mesh into smaller parts and even the calculation will be faster (1 big lightmap takes more time to calculate than many smaller ones). /and here comes the 0.1 scale handy: you won’t have shading differences between meshes!!!
Or scale the lightmaps up non uniformly that the the islands will cover most of the area!! …also you can pixel snap those tiny parts that causing the problem /basically those parts are not aligning with the texels, the edges are inbetween two texels so Unreal visualizes that!/ to line up so there are no 45 degree edges on your lightmap uv!

…oh yeah and one more thing! There is no such thing in nature as 100% white! Try to go with 0.8’s and you’ll get more realistic results! …same goes with black!

Thanks for the help guys!!!

I’m having a serious trouble unwrapping it, I spent all the day of yesterday trying to fix the problem but I couldn’t solve it. I understood that i have to snap the vertex to the grid but if I do that for one vertex then the other ones are misaligned. And this happens only for these meshes. I have many more complicated meshes in my project and the unwrapping was good, also using the ue4 automatic generated lightmaps.

But for that whenever I bake lighting in unreal engine I get shadows artifacts no matter what. :frowning:

Is it really that hard unwrapping long thin crown moldings?:frowning:

Unwrapping in Unreal doesn’t allow adjusting of the vertices by clicking and moving them in a lightmap. So you must be doing it in 3DSMax or a different application. Instead of trying to adjust the vertices and snap them to a grid in the lightmap, expand the size of those areas of the molding in the lightmap so they’re covering almost the entire 0-1 space of it. It could be 1/4 comprised of the top part, and 3/4 of the lower part. Just eyeball it and move the vertices around until that entire lightmap is almost filled with the UV island for the molding. Check to confirm that no vertex or pixels of the UV island are past the inner border, and then export / import to Unreal.

Alternatively, import the molding into Unreal without using “Generate Lightmap UVs” in the Import dialog settings. After it is completely imported, open the mesh in the mesh editor and generate the lightmap for it using an extremely high threshold for separating UV islands so it doesn’t cut the island into pieces. Then adjust its lightmap resolution and place it in the scene. Don’t place it on the wall before generating the new lightmap in the mesh editor, for the sake of avoiding lightmap mixing.