Import FBX, doesnt auto-generate lightmap for one mesh

Build:
This is a binary build, Version: 4.10.1-2791327+++depot+UE4-Releases+4.10

Details:
When I import a single FBX (but with several meshes). I don’t combine the meshes, and UE4 won’t autogenerate a lightmap for the final mesh that it imports. It generates lightmaps for the other meshes, except for the last one.

Link to video:

Repro Steps:

  1. Import an FBX
  2. Select ‘yes’ to autogenerate lightmaps
  3. Select ‘no’ to ‘combine meshes’
  4. Select ‘import all’ and let the meshes, textures and materials import
  5. Check the number of UV channels… the last mesh will only have one UV channel because a lightmap hasn’t been generated for it

Additional:
This issue seems to occur 100% of the time. I’m using Windows 10 on a fairly high-spec MSI gaming laptop…

Hi WhiteNorthStar,

Using your repro steps I’m not able to get the same result you’ve described. I’ve only made a simple asset that has three differently shaped boxes. I’ve tested in 4.9, 4.10, and 4.11 p3, without issue.

Test Asset

If you’d like to attach a test asset that this happens with, in a zip file I can have a look and see if I can see anything out of the ordinary.

Thank you!

Tim

Hi Tim… that’s great, thanks for getting back to me so promptly…

As you said, the three boxes in your FBX worked perfectly… 2 UV channels on each.

But in the attached FBX, the second building just imports with 1 UV channel. Then again, my triangle count is a bit out of control… the second building has over 180,000 triangles so this might be the cause.

Cheers, David

link text

Alright, I had a look at the asset in 3DS Max and I separated the two buildings into single FBXs and imported. The only one causing the issue is the building that is on the left (the bigger one with 180k tris).

This is really more of a content creation issue that doesn’t work well with the lightmap generation in UE4 on import. When I open the mesh and create the lightmap in the static mesh editor it’ll generate the second UV but nothing is available to view in the second UV, which is an issue.

To be honest, I could enter this as a bug, but I can already say that it would be backlogged or marked as “Won’t Fix” since it’s such an edge case and can be corrected if the UV that it was being generated from were broken up to fit the limitations of the lightmap generation.

This is a short list of limitations and how the generated lightmaps work:

  • Lightmaps do not break or divide any UV chunks when it’s being generated. It will only repack the texture UV (UV 0 in UE4).
  • Requires that UV Islands be broken up and laid out to work properly without any Overlapping UV warnings.
  • Large objects (vert/poly count) do not tend to work well. Lightmap resolutions would have to be set so high that you are more likely to see artifacts in the light bake. It’s recommended to break the model up into smaller chunks that can be reassembled.