What can I do about the lightmap size and InstancedStaticMeshComponent?

As I’m expanding my Unreal 5 journey, one of the most common warnings that I see when building my levels is the The total lightmap size for InstancedStaticMeshComponent is large, consider reducing the component's lightmap resolution or number of mesh instances in this component.; this happens when I paint foliage onto my landscape using the foliage tool.

The two listed ways to fix this problem are:

  • Reduce the number of static meshes
  • Reduce the lightmap resolution

Reducing the lightmap resolution is not something I’ve done before and I’m not sure how that’s accomplished.

As someone who’s trying to be a world builder and create lush environments; I paint foliage most of the time. I’m currently working on a forest environtment with a footpath which runs through the middle, that environment has trees and foliage. The foliage is mainly grass and is generally not that densely packed but the warning message persists.

My questions are:

  • Is there a better way to paint foliage into my worlds than using the foliage tool?
  • If the tool is best, are there any optimal settings in the tool itself which I can use to ensure that this warning is no longer there?
  • Should I look to use less static meshes when painting by reducing density?
  • If I just reduce the lightmap resolution, what affect does that have on quality?

Thanks in advance.

The lightmap for the foliage always causes a problem.

You have to reduce the lightmap size for the landscape actor.

Then also use static shadows for distance, and dynamic shadows for close up. It’s a setting on the directional light.

1 Like

you create a new lightmap for every instance you drop in. if you don’t need the foliage to have baked lighting you can set the foliage instance mesh component to stationary or movable. avoids lightmap generation alltogether. ofc you gotta rely on your sun lamp and skylight. which should be no issue at all.

1 Like

Thanks for the response, what settings am I looking at specifically ? :slightly_smiling_face:

This one

You can use bad quality static shadows everywhere, because when you get close to anything, it does it dynamically.

Best of both worlds :slight_smile:

Ah! - ( doh ), the directional light needs to be static or stationary, then you can use this param :smiley: