x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

alt text

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!

Product Version: UE 4.10
Tags:
more ▼

asked Apr 28 '16 at 06:01 PM in Rendering

avatar image

piinecone
537 22 32 369

avatar image Ben_Cykyria Dec 08 '16 at 10:09 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

alt text

alt text

stainedlod.png (746.6 kB)
goodlod.png (923.1 kB)
more ▼

answered May 05 '16 at 01:16 AM

avatar image

eliasAviles
1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

more ▼

answered Jun 21 '16 at 05:17 PM

avatar image

Tim Hobson ♦♦ STAFF
48.9k 887 101 877

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question