Static lighting artifacts on Foliage LOD models

Build: 4.10.4 source

I’ve been struggling to get my LOD steps to look good in a statically lit world. I can see from the post-lighting build warnings that unique lightmaps are not supported for LODs, so LOD instances will use the base mesh lightmap. In researching this issue I came across the Distance Fields + Dynamic Lighting technique. I tried this technique, but performance went way down and I didn’t love the way the lighting looked.

I’ve also tried including all LOD steps’ lightmaps in the base mesh and then referencing them accordingly, but they appear to be ignored when the mesh is used as instanced foliage and statically lit.

I’ve included a video and screenshot that demonstrates how the base mesh looks fine when lit, but each subsequent step carries artifacts and is often way too dark.

Video example: - YouTube

I would like to know:

  1. In order to get the results I want (static lighting + static meshes + LODs) should I just place static meshes instead of foliage? What kind of performance difference should I expect?
  2. Is support for lightmaps per LOD mesh planned, or is there a technical reason I shouldn’t expect this to happen / shouldn’t add this to the engine myself?
  3. Is it possible to create a lightmap for a high LOD mesh that degrades gracefully for the lower detail steps?

Thanks!

I’m having a similar issue.
I’m working with LOD’s but when i bake my stationary light, it stains every mesh of the LOD’s, causing this to look like arctifacts.
I realized that the main LOD is working just well, but the other ones look bad. I don’t know if this is a lighting problem or a LOD’s settings problem. I’m using just a single directional stationary light and a SkyLight, all of my meshes are static and the ground was modeled outside of UE4.
If anyone has a solution for this I would gladly appreciate it.

NOTE: this only happens with foliage instanced mesh LODs. If i do this same process by manually placing the assets, they work correctly.

I attached 2 images of the issue I’m having.

Hey Piinecone,

This does appear to be an issue here with instanced foliage using static lighting. I’ve submitted UE-32299 for this to be looked at.

From the looks of it and my test example, the lightmap that is generated for the LOD0 (base) mesh isn’t being assigned properly to the LOD1. In my simple tree mesh that I made I used a flat mapping technique (which isn’t always ideal for a texture diffuse UV Channel 0, and I generated the lightmap UV on import. The lightmap UV was repacked and changed the islands around to fit better. When I baked the lighting with lightmap coordinate index 1 set the artifact appears. Looks like UV 1 is being used for the LOD0 but not LOD1, and if I then set the lightmap coordinate index to 0 (texture UV channel) it looks like I would expect.

Something definitely isn’t working properly here and I tested this with builds all the way back to 4.6.1 with the same results. This may not have been noticed previously since it’s typical that foliage assets are more often than not used with dynamic lighting and not static lighting.

Thanks for shooting me the message about this.

Tim

We had the same problem.
You can change the UV Channel for LODs in the Static Mesh Editor.
Set all channels to use “1” instead of the default value “0”.
This should improve your rendering a lot. Please let me know if this helped you.

How does one do this? Where do you access those settings to make those changes to all of the foliage?