thanks to epic games for new [Generate lightmap UVs] 4.23

with this new build-in Generate lightmap UVs i am able to create lightmap for complex objects as this one

https://forums.unrealengine.com/filedata/fetch?photoid=1404134

As far as I know there, nothing has changed for that feature in that it still requires the mesh to have existing UV seams, meaning it’s not a completely automatic feature, it’s just an algorithm that flattens out existing UV’s

very happy with 4.23 auto ganarated uv result

For a model like that cloth, it’s best to UV it before doing any cloth simulations.

Eh, if it works it works, yah?

I don’t think that has anything to do with generate lightmap UV’s, it looks like it might just be a change to do with lightmap borders

Yeah, as far as I know, the automatic lightmap UV generation has remained essentially the same since Unreal Engine 3, so it would be a bit weird for it to suddenly change significantly with no fanfare whatsoever. I’m wondering if maybe the incorrect results in 4.22 are actually due to a recent regression, rather than some fundamental limitation that has existed unaddressed for the past ten years.

even in best of ue4 archviz we see this dark borders

They removed the weird UV 2x2 pixel padding that was added automatic in the older versions. I am just guessing that this might be the change that happened for the lightmaps.

Big if true. I’ve always hated those dark grey edge borders on generated lightmaps they were a huge pain.

I’ve done multiple small improvements to both auto lightmap UV generation and Lightmass in 4.23. They work together to remove dark corners/borders.

Auto lightmap UV generation:

  • Correctly consider the 2 texel padding when generating lightmap UVs. They are there to ensure no leaking between lightmaps packed together.
  • The bugged lightmap UV packing algorithm is fixed now. It was generating overlapped UV charts even for the simplest cube.

Lightmass:

  • The ‘representative surfel’ method used by Lightmass to process each lightmap texel has been improved to mitigate dark corners (see FStaticLightingSystem::AdjustRepresentativeSurfelForTexelsTextureMapping() ). Basically it now tries to push the samples outside if it detects a wall. Sometimes it still fails however it should make most of the cases much better.

Amazing! Thank you for the improvements! We needed those things fixed for a long time. :slight_smile: