Lightmap artifacts with small mesh sizes

After lightmap build, my meshes always had really bad shadowing artifacts, as shown in the following example

My materials cannot always hide these issues, and they even got worse on LOD switches. I messed around with this quite some time, and finally found the root cause for this: the mesh has only a size of 40cm. The only solution to get rid of these artifacts was:

Decrease the value of Static Lighting Level Scale agressively to 0.2 or better 0.1

To my understanding, this parameter is initially meant to be increased for large levels to reduce baking time at cost of quality. It is an overall parameter, so if the level is scaled ‘normally’ but has some small props like this one, I have no clue about the performance impact. Apart from the warning in the editor, [here][2], Tim Hobson says “This will significantly increase light build times in some cases”. Anyone has some rough infos from experience, what a setting of 0.1 would cause and which cases are especially sensitive?

There does not seem to exist any option to increase this for some part of the level. E.g. like adding some kind of ‘nested’ lightmass importance volume so that only certain areas could use a higher density of probes. A little bit like having lightmass portals to get more photons from defined areas.

Thanks for any thoughts on this.

Hi!

Could you show your lightmap uvs?
What lightmap resolution do you have for the mesh?

Hi Makigirl,
here are some images showing my setup. These are the manually made LOD0 UV coordinates for which I use a lightmap resolution of 64, so having a background grid in Blender of 62. Having no overlaps, no wrapping and enough padding. And try to keep islands large enough but have seams at corners to avoid bleeding artifacts.

The mesh is as follows

Rendering results with LOD0: left image with reduced static lighting level scale and changed parameters as recomended, but it is the scale parameter, that cleans up the result. Right image is the exact same mesh, just using default settings instead.

And another render result, with same mesh just scaled by factor 4 and default settings as well. Lower left are the original 2 mesh instances (LOD1 now). This shows, that the model size / level scale is the cause of main troubles.

Sorry to interject. Try changing the Ind Lt Quality and Smoothness for the default version to the same as the level scale mod (10 quality, 0.75 smoothness). Would that have any effect of improving it?

You mean, keeping Static Lighting Level Scale at default value 1.0 and only change Indirect Lighting Quality and Smoothness values?
I tried this, it does not change anything. To solve the issue, it is sufficient to only lower the Static Lighting Level Scale without touching Quality/Smoothness at all.
I just changed these as well, because I found a recommendation on a talk by Jerome Platteaux on Lighting during Unreal Dev Day Montreal 2017 to keep

Static Light Level Scale * Indirect Lighting Quality = 1.0

I think it’s rather being lucky you get such a nice result with such a low res lightmap! If it would get more lighting information (objects cast shadow onto) I think it would “break up”!
…and maybe those smaller parts are smaller than a 1 cm /as the detail set in lightmass as default/, so you won’t get proper lighting information… thus the scaling up works also if you lower lighting scale… But if you go with the lower lighting scale (=higher detail) possibly you’ll need to go higher with quality and those two will kill your building time if you’ll have a lot of meshes in your scene…
Also I think the way you create your lightmaps is not ideal: you have too many islands! You should keep more parts together (like the whole purple part could be just cut vertically in the middle at the hard edge and keep it as one island…)!

I tweaked a lot around with those maps to get a result (also with 0.1 level scale), moving and resizing islands. Sometimes artifacts appear and just moving the island to the next grid space makes them disappear, although there is enough padding in both cases.
I also had reduced the island count already for better use of lightmap uv space, but this seemed to cause more artifacts around that “belt”. That’s why I decided to make separate islands for these, where face normals of adjacent faces are perpendicular to each other. I found recommendations to do that in some places.

This one is with reduced island count:

I’m not sure, how I could reduce Island count further - will try more options.

I also tried to use Generate Lightmap UVs and let UE4 regenerate my UV channel, getting these results:

As you said, some parts are really very small, the whole thing is only 39cm. And the above image shows even more artifacts on those little parts.

This is actually part of a knife set for my first Marketplace asset, so I’m concerned about quality and want to do things right. Here’s an example image to get an impression, what it looks like:

The sheaths, especially the leather one, is the main problem. If leather is set to a light color, the material cannot hide artifacts. And there’s LOD as well, so the jumps between 2 different shadowing artifact pattern make this even worse.

Your concern with shadowing: I tried to add some shadows and get the following results:

As you say, using that low scale value along with improved quality will kill the build time, that’s what im afraid of.

Thank you for your help.

Some more thoughts on this: As these are knives, they will likely be movable objects, in which case the lightmap discussion is needless at all.

If one wants to use this as static object, and a viewer gets near the object, this is a problem then. This might be in an ArchViz scene, where setting lower level scale seems to be more common.

Other option might be to keep it as movable object anyway at lighting calculation cost or drop LODs to at least make the jumps disappear.

So I might be trying to push things too far and maybe should go with it as is (with UVs maybe designed for 128 instead of 64).

If I get things correctly, there’s obviously no way to get these artifacts solved other than tuning lightmass options or hiding things for example by material settings. So we might be at a point called “works as designed” and I’m a little bit too concerned about things?

What do you think?

An option for having lightmass allow for having level scale reduced in certain areas only, as mentionend in the beginning, would be great :slight_smile:

Thanks for your patience and help with this.

If it’s sufficient to lower only level scale without lowering quality and smoothness, then why not use that? That suggestion for Level Scale * Indirect Quality = 1.0 is a guideline, and an old one. A number of features and changes were made since 2017, so it’s probable that it wouldn’t apply…specifically to objects that require minute detail in lighting / texturing.