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

**URL:** <https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [August 21, 2019, 11:05am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137 "2019-08-21T11:05:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farshid](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/farshid/32/874107_2.png) [@Farshid](https://forums.unrealengine.com/u/Farshid)\
**Post date:** [August 21, 2019, 11:05am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/1 "2019-08-21T11:05:20Z")

</div>

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](https://forums.unrealengine.com/filedata/fetch?photoid=1404134)

---

<div class="post-metadata">

**Author:** ![darthviper107](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/darthviper107/32/710746_2.png) [@darthviper107](https://forums.unrealengine.com/u/darthviper107)\
**Post date:** [August 21, 2019, 3:51pm UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/2 "2019-08-21T15:51:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Farshid](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/farshid/32/874107_2.png) [@Farshid](https://forums.unrealengine.com/u/Farshid)\
**Post date:** [August 24, 2019, 9:07am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/3 "2019-08-24T09:07:44Z")

</div>

![t1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/2/02a0dc89cdf42e8f027b7f01e57eb04f3e62fa0b.jpeg)

 ![t2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/9/398639d8f18c799dab7bbb7ed7c6af1d4a192eb8.jpeg)

---

<div class="post-metadata">

**Author:** ![Farshid](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/farshid/32/874107_2.png) [@Farshid](https://forums.unrealengine.com/u/Farshid)\
**Post date:** [August 24, 2019, 9:08am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/4 "2019-08-24T09:08:45Z")

</div>

very happy with 4.23 auto ganarated uv result

---

<div class="post-metadata">

**Author:** ![ZacD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZacD](https://forums.unrealengine.com/u/ZacD)\
**Post date:** [August 24, 2019, 11:00am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/5 "2019-08-24T11:00:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Frenetic\_Pony](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frenetic\_Pony](https://forums.unrealengine.com/u/Frenetic_Pony)\
**Post date:** [August 25, 2019, 2:37am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/6 "2019-08-25T02:37:26Z")

</div>

> [@ZacD](#):
>
> For a model like that cloth, it’s best to UV it before doing any cloth simulations.

Eh, if it works it works, yah?

---

<div class="post-metadata">

**Author:** ![darthviper107](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/darthviper107/32/710746_2.png) [@darthviper107](https://forums.unrealengine.com/u/darthviper107)\
**Post date:** [August 25, 2019, 3:32am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/7 "2019-08-25T03:32:02Z")

</div>

> [@Farshid](#):
>
> ![t1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/2/02a0dc89cdf42e8f027b7f01e57eb04f3e62fa0b.jpeg)
> 
> ![t2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/9/398639d8f18c799dab7bbb7ed7c6af1d4a192eb8.jpeg)

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

---

<div class="post-metadata">

**Author:** ![amoser](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amoser](https://forums.unrealengine.com/u/amoser)\
**Post date:** [August 26, 2019, 3:09am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/8 "2019-08-26T03:09:43Z")

</div>

> [@darthviper107](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Farshid](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/farshid/32/874107_2.png) [@Farshid](https://forums.unrealengine.com/u/Farshid)\
**Post date:** [August 26, 2019, 6:36am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/9 "2019-08-26T06:36:20Z")

</div>

[![](https://ue4arch.com/wp-content/uploads/2016/08/lake_house_01.jpg) ](https://ue4arch.com/wp-content/uploads/2016/08/lake_house_01.jpg)

even in best of ue4 archviz we see this dark borders

---

<div class="post-metadata">

**Author:** ![NasteX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NasteX](https://forums.unrealengine.com/u/NasteX)\
**Post date:** [August 26, 2019, 6:53am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/10 "2019-08-26T06:53:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![StrangeLove13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StrangeLove13](https://forums.unrealengine.com/u/StrangeLove13)\
**Post date:** [August 27, 2019, 8:16pm UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/11 "2019-08-27T20:16:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![YujiangW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YujiangW](https://forums.unrealengine.com/u/YujiangW)\
**Post date:** [August 28, 2019, 2:14am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/12 "2019-08-28T02:14:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![NasteX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NasteX](https://forums.unrealengine.com/u/NasteX)\
**Post date:** [August 28, 2019, 7:05am UTC](https://forums.unrealengine.com/t/thanks-to-epic-games-for-new-generate-lightmap-uvs-4-23/130137/13 "2019-08-28T07:05:48Z")

</div>

> [@YujiangW](#):
>
> 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. 🙂
