The Lightmapper v0.3

The Lightmapper v0.3

The Lightmapper is a free addon for Blender that implements automated lightmapping and denoising capabilities for global illumination texture baking with support for 32-bit HDR Lightmaps for use with Eevee or external game engines. I’ve been working on it for quite a while, but it’s been somewhat unstable until now.

Initially I started working on it as a lightmapping solution for Armory3D, but since it doesn’t technically rely on Armory3D functions anymore, It’s become a standalone addon that works just as well for Eevee, UPBGE and other external game engines through .exr and 8-bit png-encoding support.

Features

  • Automated lightmap baking with Cycles

The addon doesn’t just bake your lightmaps, it also allows you to denoise them, unwraps your meshes, filter them, encode them and set up the materials for you.

  • Object-centric setup

I wanted to keep it as close to the UE4 approach as possible, so every object can have it’s own lightmap resolution, own margin settings, own filter settings and more.

  • Multi-material support

Your objects can have as many materials as you want.

  • Advanced denoising support

The addon can set up the compositor to denoise for you, but if you prefer a faster solution there’s direct support for OIDN and Optix denoising. Either way, your lightmaps should become noiseless.

  • Performance, speed and ease

Presets are available for both preview and production, allows you to get from testing to result faster.

  • Post-process filtering

By using OpenCV, post-process filtering can make your lightmaps even smoother and get rid of a few smudges that denoising can’t get rid of, or give your lightmaps a softer more artistic look. Shader-based filtering coming soon too.

  • Game engine support

Convert your .HDR files to .EXR files or better compatibility, encode to 8-bit HDR files for dynamic ranges, bake just the lightmaps and link those as attributes for export.

Download

License

It’s free, open-source and GPL

Documentation

There’s not a lot of documentation yet, only rough drafts on the wiki. I plan to improve on this in the coming weeks.

Other information

If you’re using Mac/OSX I’d like to hear if it works for you, the reason I’m asking being that I’ve no possibility to test on that platform, and as such I’m mainly just working in blind.

If you stumble upon any errors, I’d be really grateful if you could post that in the github issue tracker.

Apart from that, any feedback is welcome!


Update 0.3.0.5 (18/08/2020):

  • Fix for #38
  • Added sound alert on finish
  • Fix for resolution scale
  • Begin supersampling, only internal resizing for now
  • Fix for multiple materials while encoding

Update to 0.3.1.2 (21/08/2020):

  • Expose sound alert (+ property fix)
  • Hide undetected engines, and display in preferences
  • Smart Filtering for lightmaps
  • Possible fix for https://github.com/Naxela/The_Lightmapper/issues/33
  • Display baking process as percentage
  • Revert render engine after baking is finished

Update to 0.3.1.5 (26.08.2020):

Update to 0.3.2.0 (27.08.2020):

  • Safeguard against unassigned material slots
  • Unhide objects before unwrapping (Possibly due to Blender bug regarding SmartUV projection)
  • Fix for lightmaps won’t bake either due to hidden objects
  • Use nodes for unassigned materials
  • Fix for restoring unassigned materials (causing NoneType error)
18 Likes

Looks very interesting. Baking lightmaps is one of the areas that are a bit of a pain in Blender so I’ll try this out when I got the time :slight_smile:

1 Like

Out of curiosity, what kinds of uv unwrapping does it do? Like, is it cube mapped or what method? Does it pack to pixels?

I’m not complaining - it sounds like a great add-on - I’m just curious. Thanks!

Hi,

It uses Blender’s own unwrapping methods depending on what you select for that specific object. Apart from that - If you have the Blender_Xatlas addon, it automatically detects that as an option too (for better lightmap specific unwrapping):

image

1 Like

I’m having trouble setting the resolution… I see the “set resolution 1/1” dropdown, but I set it at 1/1 and it’s coming out at 256pix square, and I was hoping for 1024pix square.

Hi, did you get the version from the release page (0.3) or from the git version? I think this bug was fixed in 0.3.0.5

Anyway, I updated the release version to 0.3.2.0, so it should be fixed in that package: https://github.com/Naxela/The_Lightmapper/releases/download/0.3/thelightmapper.zip

I hope it helps

Fantastic !

This is a fantastic addon that I’m sure I’ll make great use of - but can i say - that sound alert is far too alarming! I jumped out of my skin when I first heard it. Better to use a nice gentle ping. Or someone saying “knock knock” in a more gentle way. I laughted, sure, but … that should be the sound for something like your computer is melting.

Ahhhhh… setting the resolution is in the OBJECT settings - not the render settings where everything else is!

Yes - the resolution is individual for each object, that is to differentiate between large objects (i.e. walls) and small objects (i.e. props). This can be a bit tedious for a lot of objects, which is why I added the override operator in the Selection subpanel, just select your objects, enable override settings and click Enable for selection - Your selected objects should now have the same resolution:

image

As for the alert sounds, I’m adding a new bunch of sounds that are less alarming :smiley:

If I get the time I would love to make a tutorial for this addon.

Hi,

I’d be very happy if someone would make tutorials for this, as I don’t really have the time myself and I’m already taking my time writing documentation

This is a very useful addon, thanks!

Two feature requests I’d have:

  • Add the ability to bake all objects to a single lightmap
  • Add a dropdown in the render settings to chose which UV channel to bake to

Right now I’m manually unwrapping my second UV channel for the lightmap, basically packing all objects into a single UV layout. I know, I can manually set UV2 in each object, but that’s a bit tedious if you have a large set of objects.

1 Like

Hi, thanks for trying out the addon!

As for the first feature request, I think I might already have covered that feature in the WIP 0.4 branch (unstable) by adding Atlas Groups - What these does is it unwraps and bakes all grouped objects together although how much you divide is up to you, to put the whole scene into one atlas group can be done in 3 clicks:

  1. Make a group
  2. Override group selection settings, and select your atlas group as unwrap mode
  3. Enable for selection (with all objects selected)

As for selecting which UV channel to bake to, I’ve added that to my to do list