'Min Lightmap Resolution': Any way to batch edit?

I think the topic title sums it up well enough.
(For anyone unsure, this is a completely separate option from the lightmass resolution settings, though it’s similar name makes them hard to separate.)

In static meshes you have the ‘Min Lightmap Resolution’ option under static mesh > build settings.
It’s pretty useful as a way to get a quick and dirty lightmap that’s more optimized for the resolution you’re going for. (Since it packs the uv shells to maximise texture space usage.)
However, it seems like it’s hardlocked to be 64x64px on every mesh that gets imported, but that wouldn’t be an issue, if not for the fact that I can’t really find any way to edit these in bulk.

Each time I want to update a mesh, I have to go to each individual mesh I want to adjust.
Then adjust it’s min lightmass resolution.
Then I have to wait for either a few seconds, or maybe up to a minute or two, while unreal is unresponsive.

Is there any way I could edit multiple of these at a time, so that I don’t have to keep doing 2-3 seconds of work, then have to wait for it to finish, then repeat?

Alternatively I should probably just pack these uvs in maya before import, but it’s way more practical to edit this in unreal based on needs.

You can adjust the lightmap resolutions for everything or for a selection by going to the Build option on the toolbar > Lighting Info > Lightmap Resolution Adjustment

You can also adjust a property within the Content Browser, select the meshes, right-click and select Asset Actions>Bulk Edit via Property Matrix

As mentioned, ‘Min Lightmap Resolution’ is a completely separate thing from the lightmap resolutions themselves. Using the Lightmap Resolution Adjustment only adjusts the lightmap resolutions.
And it’s the same with the Bulk Edit via Property matrix, this value simply isn’t present.
You can adjust the Default lightmap resolution there, but not the ‘min lightmap resolution’

It’s why I started this thread, because I simply cannot find any info on if it’s even possible to do without breaking open unreal’s source code.
It’s basically impossible to search up too, due to it being so similar to just lightmap texture resolutions that people assume it’s that.

Min Lightmap Resolution is related to lightmap UV generation, and lets you optimize the UV layout specifically for lightmaps. Taking into consideration things like padding.

Here’s an example of a mesh split up, to illustrate:

That’s the same mesh, with the default Min Lightmap Resolution set to 64 and 256.
It utilizes significantly more of the UV space, and is still packed loosely enough to avoid overlaps.

The feature’s been around for ages, but due to it’s name it’s very difficult to find info about it.
It’s incredibly useful, but the fact that you have to go into each mesh, set a resolution, wait, then go on to the next mesh makes it unwieldy to implement.

(I really wish it were named Lightmap UV Pack resolution, or something like that instead.

I complete agree with ax488, and its the same issue for e.g. other collision settings than import default.
Everytime to re-import a changed model you have to set the lightmap resolution manually higher so UE creates better lightmap UVs. The other 2 mentioned ways do NOT do that (bulk edit or lighting info)

There would be a solution to this:
a) on the fist import of a model we can specify (maybe have some default templates saveable) these paramters like lightmap resoulution, kind of collision to build and so on.


b) UE stores the import settings per asset, and then when we re-import it suggest/prests these settings but gives us the chance to manually override/change them so we can also import with other settings

In day to day work its really a pain in the ahhss to remember /note down manually which import / reduction /collision / lightmap settings you have figured yout that work PER MODEL and re-enter them again over and over!

That’s probably due to the padding, but both of those lightmap UV’s are bad, it’s not great to depend on automatic lightmap UV’s

With reduction settings, unless you’re reducing the LOD0 ( which you might, since I do that sometimes too. ) you might be better off using the LODGroups, in that case unreal applies Lod reduction automatically for meshes on import, based on the settings of the group.

Otherwise I hella agree.

Yes, but one is significantly better than the other. And I do a lot of architectural visualization, automatic lightmap UVs ( either packed in unreal or maya. ) is the only way to go to get anything usable, especially when I have to iterate a building many times over. And can’t spend time making lightmap UVs by hand. That one’s a bit of an extreme case due to not being cleaned up and merged properly, so there’s more UV shells than necessary.

Maybe sometime I can drop needing lightmaps, and can have fully realtime stuff, but that just isn’t practical right now for VR oriented projects.
So until then I guess I’ll just have to keep on doing it this way.

At this point, they’re working on a big overhaul to Lightmass, and the realtime raytracing tech might be a good feature to use for quick archviz work without having to do lightmaps anymore.

I find the automatic packing in unreal is pretty good. I use it to repack the uvs for most assets. You have to be sensible though and the charts need to be set up correctly. But for getting the correct padding between them it works great.

With sensible I mean that packing 1000 islands into a 256 lightmap most likely won’t work.

Totally agree with @ax488. Have looked for a solution for this as well but never found it. For quickly doing archviz you have to change this min-rez so it also changes the padding and you dont have to increase lm resolution to very high values just to get a nice result.

I haven’t really heard anything about the overhaul to Lightmass, do you have a link to some info about that?
I know there’s the great GPULightmass ( which I use a lot. ) but that’s an unofficial thing Luoshang’s working on, on the side.
(And that nvidia’s shown off some gameworks/RTX features in unreal that could be used for realtime previewing of lights, etc.)

As for realtime raytracing, for visualizations&renders + 2D realtime I can see it being pretty relevant, but for VR oriented archvis (All my projects are VR.) I simply cannot see realtime raytracing being able to rival lightmapping for VR for a while to come yet. (Especially with the delays and issues with RTX, and thus by extension DXR oriented GPUs. )

We’re now over a month in after the release of the raytracing cards, and they still can’t actually use their raytracing hardware, so I’m still pretty skeptical on them being relevant for a good while more. And while Epic is working on DXR stuff ( like the features used in the Star Wars video. ) we have no timeframe for when they’ll come, or how performant they will be.
(The cinematic Star Wars demo is great and all, but that’s 1080p24fps, on a 2080ti. And wasn’t that partially lightmapped too? With raytracing mostly used for AO and reflections? )

But yeah, good to see that other people are using Min Lightmap Resolution too, I just really wish it was possible to bulk edit + build it, so that I could modify entire groups at the same time, and have them package in the background.
(One of the biggest annoyances is that the packing only takes up 1 thread, so unreal just sits there frozen waiting for 1 cpu thread to finish, instead of letting me do other things at the same time.)

I totally agree ax448! Min lightmap resolution should definitely be part of bulk edit. Very time consuming process atm.

The only way right now to speed it up is to set up multiple projects for importing the assets + packing the lightmaps, then migrating them to the proper project at the end.
Especially since higher resolution packing can take multiple minutes.

Really glad to hear other people agreeing, it’s been basically impossible to find any kind of discussion about it due to it’s name.

Went ahead and set up a post in the Feedback forum as well, hopefully someone sees it and deems it worthy of a quick feature implementation for 4.21 or 4.22.

The packing isn’t the particular problem, the UV’s just aren’t good because it’s using an automatic mapper that splits the edges if they go beyond a certain angle. Even with the more efficient packing there are small islands that will require a high resolution lightmap to look good.

Perhaps this has already been talked about/suggested, but it would also help upon the initial Datasmith import dialog box to be able to set the minimum resolution at something higher than 512!

I also agree with ax448. The minimum, and effective, lightmap resolutions should both be available in asset audit. The asset auditor should also allow the user to update those settings from that window, instead of having to then go into the properties for each mesh. This would deliver the batch process everyone is begging for. Unreal would benefit from upgrading the asset auditor into something more similar to the “attribute spreadsheet” in Maya–which already has these types of functionalities.

Now that I think of it: right-clicking a collection of static meshes, in the content browser, and selecting asset actions>bulk edit via property matrix is already more like the attribute spreadsheet than asset audit. It already allows for updating the effective light map resolution (nice!) but is lacking the minimum lightmap resolution. Doesn’t seem difficult for the Unreal developers to add…

Another way to do it would be to allow the user to change the settings during the mesh import

  • be able to set a light map resolution in the import window. Let’s say you would set that to 256, the imported mesh would have a light map resolution set to 256 for (optional) creating a light map in the build settings and the light map resolution in the static mesh section would be set to 256.
  • and be able to decide from which channel the (optional) light map should be build and which channel to store it in.

Then by clicking on “import all” it would use that setting for every mesh in the import cue. And it would use the settings of the last imported mesh as default for the next mesh. It just requires to make the right choice during import.

I understand that every mesh is different and a light map setting that is correct for a tiny object like a plate might be totally wrong for a giant building mesh. So there is no real good “default setting”. But this way the default could be changed during the import process and would be right for many more assets per project. If I make 10 kitchen cabinets they would all have the same settings pretty much. It would help a lot.

Another thing that would be helpful is to set the light map resolution in the static mesh section automatically to the same value as the one in the build section. I know there are cases where the two values are different but that’s very rare. You could always go to the static mesh section and adjust it if you have to.

Isn’t that how it is now already? If you right click on the asset and choose re-import from the context menu the settings will stay. If you import the mesh over the old one the settings will reset to default.

Any news on this one?
Would really appreciate to have a quick way to deal with this.
Doesn’t seam to work in editor utility blueprints either :frowning:

There are several features in the engine to accomplish what you want to do - Setting Static Lighting Level Scale to a smaller value will increase lightmap resolutions across the entire map (0.25 for 4x, 0.125 for 8x). Otherwise, it is recommended to set this value per asset since different assets are different sizes, and you’re going to want to optimize per mesh (sometimes per object in the engine), especially if you’re using uncompressed lightmaps.

This comes up a couple times, but this is unfortunately a misunderstanding of what the ‘min lightmap res’ setting does.
When you do as you say, and adjust the lightmap resolution in the scene, for the meshes, all you’re doing is setting the texture size that gets used.

Setting the actual option in the mesh, either on import, or after, makes unreal repack the UVs to utilize the texture space better, with proper UV padding. (Yes, this can be done in external programs as well, but that requires reimporting.)
This is particularly important if the mesh has a lot of islands, which causes the native lightmap packer to pack it very inefficiently, due to enforced padding around each island.

Basically if you import a mesh with 64x64px minimum lightmap resolution means it’ll pack the UV islands as best it can, including a… 4?px gutter inbetween the islands when possible, to avoid artefacts.
If you then just set the lightmap resolution of that mesh in the scene to say, 1024x1024, that means that that 4px gutter between islands is now a 16px gutter inbetween each uv island, leading to a lot of lost UV space, and wasted memory. (Especially as you say, when rolling with uncompressed lightmaps.)

If you then instead went into the mesh settings itself, and changed the min lightmap resolution to 1024x1024, it would repack the UVs in the lightmap to use that resolution more efficiently.
Depending on the mesh, it can lead to pretty significant UV space utilization benefits.

It’s a big part of the frustration of talking about this, because the naming of the option means people conflate it with just the normal lightmap resolution in scenes, instead of what it actually is.
It’s a poorly named feature which makes people gloss over it, when it infact allows for more efficient use of lightmap texture sizes, as it’s a native UV-packing solution.
(Again, instead of needing to do UV packing externally.)