Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    '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.

    #2
    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

    Comment


      #3
      Originally posted by darthviper107 View Post
      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:
      Click image for larger version

Name:	MinLightmassRes_1.PNG
Views:	2
Size:	517.5 KB
ID:	1538718
      Click image for larger version

Name:	MinLightmassRes_2.PNG
Views:	2
Size:	539.3 KB
ID:	1538719
      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.

      Comment


        #4
        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.

        and

        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!

        Comment


          #5
          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

          Comment


            #6
            Originally posted by Vollgaser View Post
            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!
            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.
            Originally posted by darthviper107 View Post
            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
            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.

            Comment


              #7
              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.

              Comment


                #8
                Originally posted by darthviper107 View Post
                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
                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.
                www.s-dot.de/viz
                ArchViz User Interface :: UE4 Marketplace.

                Comment


                  #9
                  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.

                  Comment


                    #10
                    Originally posted by darthviper107 View Post
                    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 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.)

                    Comment


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

                      Comment


                        #12
                        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.
                        https://forums.unrealengine.com/unre...-in-background
                        Last edited by ax448; 10-14-2018, 12:21 PM. Reason: Added url

                        Comment


                          #13
                          Originally posted by S-Dot View Post

                          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.
                          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.

                          Comment


                            #14
                            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!

                            Comment


                              #15
                              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..
                              Last edited by JonathanArmstrong; 04-25-2019, 12:16 PM.

                              Comment

                              Working...
                              X