Auto-generate UV for lightmaps Issue

Hi!
At my place of employment I do Architectural Visualization for VR in Unity game engine. (CV1 and Gear-VR)
However, I’ve also been a big fan of the Unreal Engine 4 for a long time.
And would very much like to do some project in UE4, but there is a huge hurdle stopping that, namely Auto UV lightmaps.

How come UE4 does not have auto-generate UV for lightmaps that actually works and is usable?

In my workflow I import scenes from Archicad, Apply UV’s to all the objects with real world scale UV’s and textures.
It’s a one button press in 3Ds Max, Flatten UV’s. Then I import everything into Unity and press auto generate.
Voila! Everything works and all is well in the world.

This, however is not the case in UE4. The Auto-generate function is unusable. It is a MAJOR hurdle, and makes UNREAL Engine NOT Viable for large Architecture scenes. What can be done to battle this?

I’m attaching a screenshot illustrating the problem.

Hi Deathrey!

Thank you for the reply! :slight_smile:
I will have another look at this scene tomorrow when I get back to work, and will lett you know how I fair then.
(Might have skipped some steps)
Thank’s!

Good day, Pendali

Let me clear up how auto lightmap UVs work in UE4.
It takes existing UV islands from UV channel you specify, and packs them according to the settings. In the static mesh viewer you have the following things to tweak:

  • Min Lightmap Resolution is the value for intended minimum lightmap
    resolution, that will be used with
    this mesh. It determines amount of
    padding between UV islands.
  • Source Lightmap Index is the index of UV channel, that will
    provide existing UV islands for auto
    pack.
  • Destination Lightmap Index is the index of UV channel, where generated
    lightmap will be placed.

So your workflow should not be much different. Export your model with two sets of UVs. UV channel 0 should contain whatever mapping you are using for your textures. UV channel 1 should contain UV islands, to be used for lightmap. In general case, angle-based unwrap(I haven’t worked with 3D max, but I assume that is what you are referring to as flatten UVs) will suffice for UV channel 1.

You can check results of automatic unwrap in static mesh viewer.
Lastly, be sure to increase lightmap resolution for the mesh to a sufficient level.

Hope that helps.

Hi!
I’m still not getting anything usable. I’m not a 100% sure, but I suspect that the issue is that in Unreal Engine you can’t specify a “texels per unit” or “pixel resolution per Meter” like you can with unity.

Hence, this scene would require lots of manual labor.

I typically have 1 or 2 hours topps, to do UV layouts + export/ import prosess. This is for an entire building with outside and the inside (including the furniture) So spending time deciding which object will be divided into what Lightmaps is just not a viable route for me, and unfortunately excludes UE4 from my workflow. :confused:

30 minutes would be more than enough for an average archviz scene. What do you mean exactly by deciding which object will be divided into what Lightmaps?

hmm… Might just be me then. Most likely I need some more time to understand UE4 ^^,
Anyways, In unity all objects with a “texels per unit” resolution that is smaller than the Lightmap resolution gets packed automatically into a new Lightmap UV layout. (cross object) so that all imported object gets the same lightmap real-estate. So unless the object is larger than the allowed lightmap resolution, it will get packed together with other object in the scene. (c:

Edit: I was assuming that UE4 packed objects from within 1 FBX export into 1 Lightmap only? Is this the case?

Nope, UE4 packs various meshes into combined lightmaps as tightly as practicable.

All right! :smiley: After following your advise, and setting all my lights to Static. XD I’m finally starting to get some better results. Haha XD Might have been a slight case of user error ^^, Where can I view the rendered lightmaps?

go to the World Settings >> Lightmass >> roll out the additional information and roll out the Lightmaps section.

I don’t think that packed lightmaps would be helpful though.
Consider using Lighting only and Lightmap Density view modes.

Also linking you comprehensive thread about tuning lightmass for best arch viz results.

Thank you! :smiley: I will definitely give these threads a read!