Why are my Lightmap UVs messed up?

Hello all!

The lightmap my objects are distorted.
Yet the lightmaps in Blender are properly placed,
and the property in UE4 seems to me right.

Thank you for your response.

(Sorry I use translate.google.com)

http://image.noelshack.com/fichiers/2014/26/1403491105-sans-titre2.jpg

Unreal already has a lightmap builder. Go into the static mesh editor and under the window tab check “Generate Custom UVs”

(the video is in English but he shows you how to do it)
But I have noticed this issue between Blender and UE4 and I hope Epic does something about it. Try exporting your lightmap material and applying it and then going into blender and fixing the issues (like a guess and check).

Hi Loux Xavier,

I’m working on a similar issue, it would seem, with Blender and UE4 FBX import. I have been unsuccessful in getting their issue to replicate.

Would you be willing detail your steps to reproduce the error? If you have a sample or test asset that is giving you the same issue can you link one here as well?

Thank you!

Tim

Hi Loux Xavier,

Looking at the mesh you’re using in the editor. It’s titled 400x300 wall. Are you scaling this in the editor?

I do not think you have a lightmap issue at all. This looks like you’re scaling the mesh. Which will not auto update the lightmap to be fixed. You cannot scale the mesh and the lightmap not be scaled accordingly.

If you are using the same mesh and scaling it, this will not be fixed without exporting the mesh and having multiple meshes that have unique UVs layouts.

If you are experiencing a problem where you build a mesh in Blender, export it to UE4 and are having the issue similar to above. Please follow the comment I made above.

Thank you!

Tim

@ ovrcookedfunion

Hi ovrcookedfunion,

Thank you, but the “Generate Custom UVs” makes me bad UVs and my model is modular so the lightmap should be aligned with other modular objects for not see the separation.
I must manually the UV LightMap in blender.

@ Tim

Hi Tim,

The object of EU4 does not satisfy me so I recreated in blender.

I Simply Create a cube X: 400 Y: 10 Z: 400 and two UVs UVMap and LightMap.
I then used for all architectural objects by changing only the object without affecting the UVs

The blender backup here.

(Sorry I use translate.google.com)

Hi Loux,

I’ve opened your assets and I’m not seeing the same thing you are.

Using your assets this is what the scene looks like for me. I’ve placed three of the floor and one each of the wall pieces you’ve given me.

The wall and the one with the door. Their texel density is fine. (The door does have one overlapping UV though, so that will need to be fixed otherwise you’ll continue to get lightmap overlapping warning when you build lights).

The Wall piece on the end needs to be scaled in the UV appropriately with the other two wall pieces to have them been the same texel density. That’s why it’s bright green. It’s using more UV space than the other pieces meaning it will have a higher resolution with its texture.

The floor piece appears to be squished. The UV layout shows it being in a rectangle even though the model is a square. Correcting that will fix that issue.

If you have any other questions feel free to ask!

Tim

Thank you tim I remake the model in Wall_400x400 improve the maximu UVs LightMap but I have Still the same problem. :frowning:

I do not know why I is not the same thing you are.

This is the model in all formats.link text

I also noticed what-thing: if I multiply the UV lightmap by 2 on the Y axis the model has a good lightmap in EU4 but its been a overlaping.

Hi Loux,

Thank you for being patient and working with me on this. I’ve actually found a bug through this that I’m able to reproduce the issue from a fresh file I made in 3Ds Max. I’m in the process of submitting a bug report for this. However, I do not have a time frame for when this will be fixed.

With this being confined to the Lightmaps UV the amount of stretching shouldn’t affect your shadows greatly.

Once this issue is addressed I will post back here.

Thank you!

Tim