AutoLightmapUEr, a plugin that automatically adjusts lightmap sizes for every mesh in your map

Version 1.2 is now also live on the Epic Marketplace.

New in version 1.1

  • “All” mode now also works correctly on (Hierarchical) Instanced Static Mesh Components.
    Before, UE returned the extents of the surrounding volume of all the instances together, apparently.
  • “All” mode now also works with freshly added blueprint actors.
    Blueprint actors that were freshly added to a map return multiple copies for an AActor Iterator (seemingly one per component?),
    which could lead to sometimes picking the wrong lightmap size if only some components were scaled.
  • “Clear tags” button moved and changed from just an “X” to a more clear label
  • Cleared up how the values are used, with expanded tooltips: the “extent” values are the half-length from the center by default.
    There is now also a new option that switches calculation to full-length, if you prefer, for your own presets.
    (Note that the values for the 2 default presets don’t get changed by default.)
  • You can now use folder names to override the currently selected preset.
    Actors inside a folder whose name matches that of a preset, will use that preset to calculate lightmap sizes.
  • New “Go deep” toggle that will propagate the lightmap change to the meshes themselves, and their various LOD levels.
    Was added because some people encountered strange unreproducible effects with lightmap overrides working backwards for lower LOD levels.
    You shouldn’t need this, normally, but if you run into any trouble, you might maybe give it a try?

New in version 1.2

  • You can now also use the actual surface area of the actor’s static mesh for calculations, if you prefer.
    Note that none of the default presets were made with this in mind, so you’ll have to roll your own.
    (The plugin lists all surface areas it’s calculated in the output log to give you an idea of the values to use)

Hi

Just a short post in order to say we released our first client’s projet done with AutoLightmapUEr
It was quite a challenge as the project is really big and we had a tight deadline (4 weeks)
Everything worked fine and the plug helped us in easily dealing with interiors/exteriors lightmap resolutions
You can see below one example of an high resolution applied on the interior and low resolution applied outside


Trust me, we saved a lot of time and graphic card’s memory :wink:
So, don’t hesitate if you want to use it in ‘real world condition’

Here is the final video in case you are curious :

https://vimeo.com/190130951

I suggest to improve the user interface in the future but it works well as it is
Thx

Thanks, glad it was useful.
It’s why it was created.

Version 1.3 is up on itch, gumroad, and the Epic Marketplace.

New in Version 1.3

  • Compatible with the new 4.14.0 build of Unreal Engine
  • Blueprints and Actors containing multiple Static Mesh Components are now all updated, instead of only the first one

Hey turfster !

Your plugin could be the answer to a quite big problem in our Archviz workflow…

We are using big, very big models (millions of polygons) from revit projects, and we have to cut these models into smaller ones to be able to have a decent UV lightmap.
The problem is, the number of meshes explodes quite easily and it is a hinder to go through each model and change the lightmap resolution.

Is your plugin acting well (and fast !) when changing lightmap density of hundreds of complex objects in a single scene ?

Lightmap density consistency is a must with big Industrial/Arch projects, and we’d love to be able to use your plugin in our workflow.

The complexity of each object is irrelevant, since it’s only changing one value on each of them, and it handles my scenes with thousands of objects easily, so I reckon you’ll be fine ������

Sounds good then, thanks for the feedback ! Will buy and report in the next few days.

The calculation should be almost instant(ish). Your actual lighting build times will depend on what sizes will have been picked, of course.

To expand slightly on this, there are currently a few different ways of calculating and applying the new wanted lightmap sizes, listed from fastest to slowest.

  • based on the half-length of the longest side of the bounding box of the mesh (this is what the 2 built-in presets work on too)

  • based on the full length of the longest side of the bounding box of the mesh

  • based on the total surface size of the mesh (if this is selected, the log will reflect the calculated surface sizes to help you build your own preset)

[LIST=a]

  • only for Static Mesh Actors, which will work off the actor’s axis aligned bounding boxes for speed (this is pretty much legacy at this point, but if you have a really simple level, it’s still the fastest way)

  • “All”, for every actor (including blueprints) that contains at least one Static Mesh Component (or a child thereof, like (Hierarchical) Instanced Static Mesh Component), which will work off every mesh’s object oriented bounding boxes (or mesh surface if you’re using option 3) scaled by the actor’s scale

  • The second and third option will require some trial and error of your own to try and find the data that you want, but since neither of the presets are really made for archvis, you’d have had to do this anyway.

    Maybe people that have actually used it for archvis like cs2010 can add some more tips.

    Hey turfster, thanks for chiming in !

    We are using a lot of small, big or long objects in our scenes and have little time to fully optimize each UV of each model. Models are unwrapped with the SteamRoller automation tool, and the UVs can be pretty messy.

    While we are still tweaking the values, your plugin is already quite efficient. Half/full length is giving us so-so results and the Surface to Resolution option is the most accurate so far. I hope to have a good preset out next week to be able to bake draft and HQ lightmaps.

    I’d love to have some Archviz feedback from cs2010 too, although our models are more “industrial” sized (hangar sized) than “office” sized. :slight_smile:

    Glad I could help!
    And yeah, for archvis, you probably want surface-based calculations.
    (It was pretty much requested for archvis, so ;))

    While I still have it in mind, would it be possible to make the res display responsive with window scaling ? Feels a bit weird when you have a lot of elements and have to scroll when you could just scale it to display everything. :stuck_out_tongue:

    IE :

    EDIT : also, is there a reason why the lightmap preview doesn’t update without baking lights again ? I mean it does update the override resolution values, but does not update the preview colors/grid when in lightmap density mode. You have to bake again without even knowing if your new values are good or not (unless you change em manually once more, but it kinda defeats the purpose of AutoLightmapUEr).

    EDIT 2 : Reloading the map seems to refresh the lightmap density view…Sometimes ? Kind of a temporary fix I guess ?

    Anyways, food for thoughts :stuck_out_tongue:

    Slate is really really bad at scaling with things put next to each other (notice how pretty much everything in the base editor layout is just things one below the other), so I had to cap it somewhat. There’s also no way of knowing how large the window actually is to try and work around this, so it’s pretty much designed to a fixed standard size, sorry.
    People usually dock it next to the world settings/details tabs or down next to the content browser/message log, if that helps?

    This one’s basically just the way UE works, as far as I have been able to ascertain.
    While it’s changed in 4.14 (updating automatically sometimes, as you noticed), the editor doesn’t seem to update the lightmap density views until the actual maps have been generated.

    Oh well, guess we’ll have to bear with it… Thanks for clarifying turfster !

    Both the Epic Marketplace and itch.io versions are 15% off for the holidays.

    just bought it and loving it!
    Some noob questions here (I’m not much of a ‘technical’ guy):

    1. is there a reason the “Total surface area” values in the presets are in power of two?
    2. When should I press the apply button exactly?
    3. What are those tags you can clear for?
    4. What values does the go deep option actually modify?
      Thank you!

    Sorry for the delay.

    1. To have some notable and easily quantifyable distance between the two datapoints when adding a new value. You don’t need to actually use powers of two for your own presets.
    2. Once you’ve created/selected your preset and checked the settings you want to use, just hit apply while the level you want to change the lightmaps for is loaded. Once you’ve got a preset and settings set up the way you want, you could basically just hit apply in every level you want to use the same settings for.
    3. They’re basically there to tell AutoLightmapUEr what meshes have already been changed, and if you started with ignore turned on, they’re used to tell it which meshes already had their own lightmap settings and should therefor not be touched by ALM.
    4. Lightmap settings are normally only changed on mesh actors in a level. “Deep” edits the min lightmap resolution for all LODs to be the required lightmap setting or less instead of the 64 that’s there by default in the actual mesh sources themselves.

    An updated build for 4.15.0 has been sent to Epic for the marketplace, and is already available for itch buyers.

    4.15 Epic Marketplace update is now live.

    i need this plugin in a 4.15 source build.
    i cannot compile the latest version in visual studio

    You should be able to move your bought launcher-build over to the source version of the engine without problems.