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: https://www.youtube.com/watch?v=sgr9V4aBoZc&feature=youtu.be
I would like to know:
asked Apr 28 '16 at 06:01 PM in Rendering
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.
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.
answered Jun 21 '16 at 05:17 PM
Tim Hobson ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here