Single FBX, Multiple Meshes - Lightmap UVs Overlapping

Hi!

I’m trying to import DexSoft’s Castle model into Unreal Engine 4. I’ve used Blender to add my own lightmap UVs to all meshes and set the import options accordingly:

  • LOD0/Build Settings/Generate Lightmap UVs = Off
  • LOD0/Build Settings/Source Lightmap Index = 1
  • Import Settings/Generate Lightmap UVs = Off

However, when I build my lighting, I still get the message “Lightmap UV are overlapping by 96.5%. Please adjust content - Enable Error Coloring to visualize.”

The file contains multiple meshes and each mesh is UV mapped on its own. Could that be the problem? If so, how do I fix it? Do I have to join all the meshes together?

if they are all separate objects in blender that shouldn’t cause a problem, if they are all 1 object or you combine them on import then it could. can you post a pic of your lightmap UV in UE4?

I have no idea what model that is, sorry; so with that being said… break it up into smaller, individual pieces. UV map those, redo the pivots, set it to 0,0,0 position, and export. You may find that you have 10+ of the same chunks in the building, so then you only need to perform the actions on one of those, and only need to import the one into the engine.

edit: Simplify it as much as humanly possible. It will make UV mapping and collision generation that much easier, although you will need to “assemble” it all back together in the engine. If you’re going to be re-using the castle in multiple scenes, then I would recommend, and have been experimenting with, assembling the model in a blueprint (even though the BP might not actually do anything), and that way you can just drag/drop the one BP into the scene, and the castle would be pre-assembled.

If this is a good way or not of doing something like this, I have no idea, and would like a professional opinion on it.

Okay, first, here’s the model in Blender. It is split into 30-40 individual meshes, all with their own lightmap:

Here it is imported into UE4. It appears to have turned into a single object:

So an export/import issue maybe?

@SaviorNT: All good advice. I still hope that I can at least have multiple, individually UV-mapped meshes in the same FBX model because even with library linking in Blender, having to split it into separate files would make working on the model so much harder :slight_smile:

Hi there

Turn off “Combine Meshes” in the Import Menu, this should solve your problem.
You got now 40 single meshes, select them all und drag them to the Viewport. After this, set the Location to x=0 y=0 z=0

I only see 13 meshes that you need to export in that castle.

  • The walkway: it’s being used twice in the picture
  • Castle Wall corner pillar: It’s being used 9 times
  • Cut the Wall into modular sections and then duplicate them across to the corner peices
  • Entrance

etc… Anything that can be duplicated, only export that mesh once. No need to export the entire project.

Also, at some point in the import/export settings, you have “combine mesh” checked.

As far as reassemble, one little trick I learned is to assemble the house/building/castle or w/e, make it all one mesh (combine everything). Center the pivot point to the XY center, Z: 0. Depending on blender, right down these coordinates for the pivot point.

Separate each mesh object, and then move the pivot point to the location above.

When you import into UE4, it makes reassembly of these types of models so much easier :wink:

@SaviorNT: I did get your point about deduplicating the meshes and placing instances in the editor, but I still had to know what my options are - all meshes in single FBX file or one mesh per file :smiley:

The “Combine Meshes” option was indeed the culprit. I had already seen it in the UDK3 docs, but thought I was removed in UE4. Turns out that it’s only available when importing a mesh for the first time. It then exports each mesh in the FBX file independently, solving my lightmap issues.

Blender’s instancing (create mesh once, then duplicate object with Alt+D) doesn’t work, sadly.

So here’s my plan of attack:

  • Deduplicate everything in Blender
  • Put pivoted originals in a folder in Blender, rebuild castle with instances of those meshes
  • When creating the FBX, only export said folder with the original meshes
  • Create instances of meshes at appropriate positions in UE4

blender-instances.png

Thanks everyone, problem solved!