Unity's Enlighten - baked lighting a big step backward from Beast.

I hope I’m not the only person on the forums who thinks the quality of Unity 5’s baked lightmapping has taken a massive step backwards compared to Unity 3 & 4 which gave fantastic results working with Beast??

We’re working on mobile and are totally reliant on the ‘baked’ solutions and not realtime lightmapping. The reality is that huge numbers of devices especially mobile cannot support realtime due to processing time & memory issues.

The difference between the visual richness & quality of the baked lighting pipelines is very apparent. I’ve worked with many lighting tools over the years but feel incredibly frustrated every time I try to light a scene in Unity 5. If I had two machines with identical assets in an environment scene - one machine with Unity 4(Beast) and the other with Unity 5(Enlighten), Unity 4 would give better quality results than Unity 5 and in a faster time.

Beast gave much greater control with the XML file which would expose very specific params to balance between quality and render times. Enlighten in Unity seems to enable only a handful of features for the artist to adjust and doesn’t even include the ability to change the number of bounces? Why would this be disabled, I’ve never known that in other apps??

Currently I’m having to seriously consider a plan B for our lighting pipeline which would involve using a external program to bake the lightmaps(which is far from ideal and I really don’t want to do this!).

Unity’s Enlighten also doesn’t allow us to create custom atlasing in the editor which benefited us hugely on Unity 4. This has already been mentioned in previous posts on the forums but seems to have been ignored by Unity.
Also on the subject of lightmap uv packing, I’m at a loss to figure out what algorithm is used to pack all the scene objects together when baking because I’m finding Unity generates unnecessary lightmaps even though there are very obvious gapping holes in the first lightmap tpage?

I’ve waited until now to write this email because I was really hoping Unity would unveil fixes & possible new features to help the artist get the most out of baked lightmapping for mobile devices. This doesn’t seem to be the case. Unity is a great game engine and editor, I love using it but for the first time ever I don’t enjoy lighting in this package which is a great shame! :frowning:

12 Likes

You can still have the same time of lightmap as other versions… just set as baked - Mixed on the lights, if I am not wrong

If you tweak it long enough you can get it looking similar to Unity 4, but there are some things that just aren’t as good.

Your Ambient Occlusion will disappear wherever there’s direct light, so it won’t look as good, fundamentally. It’s also harder to do a blown-out light.

Both of these issues come because it does things more “realistically”, which isn’t always what we want. Some of the shadowing seems “simpler”, too, but I’d have to test that more.

Compare this (Unity 4) to this (Unity 5). I could tweak more, but that will never fix the AO.

Hi @Mahoney014 ! Have you tried using custom Lightmap Parameters to control quality?
The atlassing was improved in 5.2 beta 4 by @Kuba .

@Stardog An option to apply AO on direct lighting is on our todo list already.

Our development team are very much in the same boat as you and are now so frustrated at the quality of both the light baking and the UV packing that we are having serious discussions about how we can produce both our bakes and UV’s outside of Unity, we just do not know what else to do. Our goal is to produce amazing art, from our previous mobile titles using Unity 4 and beast we learnt that the best route to quality is through good UV’s and stunning light maps. Both of which we are unable to achieve in Unity 5’s current state.

We routinely got great results from Unity 4 and Beast with relative ease, the final bakes always had a great vibrant feel, smooth colour transitions and deep saturated colours - good fun all round. Unity 5 has yet to produce one light bake which we are happy with, with a very high percentage of bakes having blotchs, noise or random colours which only clearing the Cache has a chance of fixing. It’s very time consuming and frustrating (our swear box has now overflowing)

The problem is, as soon as we start trying to move away from Enlighten, weather that is baking in Unity 4, some how trying to hack Beast into Unity 5 or even trying to Bake in Maya / Modo we start eating into our man hour budgets which we would rather be spending on making our game great.

Either we need to waste code time putting together a walk around to avoid Enlighten altogether in its current form, or we try to hack Unity apart to at least give us access to much more of the lighting settings which seem to have been hidden away giving us very little control - This of course wastes Code time and then Art time testing it out.

Or we go for an external solution like Maya which again is going to waste time as it will far more complex then simply putting in some scale values and hitting bake. We will need to waste art time doing look Dev and figuring out a work flow and I’m pretty sure code would again have to get involved as well to get the results working correctly in Unity.

I appreciate that you guys over at Unity are working your hardest to get improvements into the baking system but as developers we have schedule to meet and quality bar’s that need to be reached for our games to be successful. With no road map and very little communication from Unity about what improvements are in the pipeline or when we should be expecting to see them it is making our lives very difficult. Ultimately it means we are having to look into what our Plan B is as discussed above.

It would be very useful for Unity to let us know what the plan is going forward and when we should expect to see improvements.

8 Likes

Hi @KEngelstoft , do you know if Unity will be adding back support for custom lightmap altases? Unity 4 had a LightmapEditorSettings.lockAtlas, which has now been deprecated. This allowed us to create very tightly packed lightmap rects using a bespoke algorithm where artists could set a target lightmap size, and we iteratively scaled lightmap rects until they fitted in the texture with minimum wastage.

2 Likes

@Stardog - yeah the AO not visible in direct light divides people for sure(especially with stylised visuals). John Hable gave an awesome presentation for Uncharted 2 about AO which is definitely worth reading (pg148>) - Hable John Uncharted2 Hdr Lighting | PPT

Hi @KEngelstoft , I have tried tweaking the settings in many ways either to get smoother results or find ways to improve the bake times but its been such a struggle and it can also give inconsistent light bakes when we need scenes baked in quick succession if alot of changes are made. This is particularly apparent during a deadline and twice now this has happened to us and really letting us down, whereas in Unity 4 it worked everytime and looked consistent in quality.

Beasts XML provided such great control between the quality of shadows, indirect, ao and the ability to add an IBL with a set rotation plus it drastically reduced render times compared to the default settings in the lightmap editor.

I think we would all benefit if Unity could expose all these hidden settings for Baking lightmaps within Enlighten as this could help in some way for us to improve the baking quality in our scenes. A friend told me Enlighten has a ton of parameters available to tweak and he was puzzled why Unity won’t turn these on? This also includes vertex light bakes. Again this is something that is used all the time in mobile development(and was used alot on Gen3 consoles such as Uncharted 2 for example).

Thanks for the heads up about the atlas improvements in 5.2 beta, it will help alot although ideally we should be able to just force Unity to render everything into a specific sized lightmap such as a 2k texture and not overspill into an additonal lightmap texture. This could save so much time as normally we have to spend hours and hours tweaking tiny numbers for the object light scales and rendering each change until it all fits into one tpage. Sounds bonkers doesn’t it?!

1 Like

Making lock atlas work needs to shift some responsibility to you. Lightmap index, scale and offset are not serialized on a renderer anymore. So if you just manually set those properties in the scene they will be gone as soon as you reload.
You’d need to set the lightmap index, scale and offset from a script and kick off the bake with a lock atlas flag. Then after the bake those values would just be stored in the lightmap data asset / GI cache, so there would be no need for you to set them again. Does that sound good?

To be honest Beast.xml file was mostly useful to switch from final gather to a path tracer and to set the IBL.
I would be curious to hear of any other parameters that you actually found useful there.

With Enlighten we allow you to turn on final gather directly in the Lighting window (as the default is to upscale the realtime GI result) and the IBL is automatically picked up from the Environment Lighting settings.

Most of the parameters that make sense for you to tweak have been exposed in the LightmapParameters.
There’s of course many more parameters in Enlighten, but they don’t make sense in the functionality that we’re actually exposing.

Baking lighting into vertex color is completely separate. It won’t just happen by us exposing some magic parameter. :slight_smile: It’s an actual feature that complicates the system and it better be worth it. So far there hasn’t been that much interest in having it: http://feedback.unity3d.com/suggestions/graphics-beast-vertex-baking

Back in the 3.0 alpha (yes, 3.0) the atlasing actually expected a budget and packed things to fit within it. It turned out that people didn’t actually care about the budget. What was important instead was that they could set the resolution in texels per world unit and have the objects respect that.

Why do you care that much if it fits in one lightmap?

Hi @Kuba , thanks for your reply. Yep, that sounds fine. I presume you’re talking about how it could work in the future, and I can’t do it that way right now?

Hi @Kuba ,

Coming from a console background, and now working on mobile we’re using all the memory we possibly can, at least on our minimum memory sized machines. It’s alway been the case we set a texture size that’s allowed for the lightmap and the artists make the best possible use of it. If they had more space it could look better, but that’s always the way.

It’s been really hard for them to achieve this with Unity both due to the way scene edits or object lightmap scales cause a spill onto a second texture, and due to the fact they don’t know this has happened until after the full bake. Even being able to see the packing results without having to do the actual light bake would be super useful.

Thanks,

Jools

4 Likes

I’d like to echo what @Mahoney014 and @StevieWonder have said. I don’t think I can put it any better than they have already so I’ll keep this short.

I work with both Beast and Enlighten. Beast is always a pleasure to work with and produces predictable, consistent, high quality results. Enlighten is very slow, produces lower quality results, is unpredictable (random blotches/noise), and has less features (no lock atlas, no control over number of bounces, no bake selected, etc).

I look forward to when lightmap baking in Unity 5 is as good as it was years ago in Unity 4.

5 Likes

Please tell me where can I find this script?

Hi @Kuba
yep here’s a few - the Number of Bounces - I’d really like to hear from you guys why this is missing from Unity’s Enlighten? Please can this be put back in???
Ability to set the max number of threads? Really handy when I need to reserve a couple back whilst doing stuff in the background. Unity 5 seems to max them out!
giTransparencyDepth - handy when dealing with lots of alpha.
maxShadowRays - nice to have separate control for the number of shadow rays.
iblTurnDome - we change the light direction all the time so its handy to be able to use this for skydome image files. In most cases I never use the procedural skies.
Some of the in depth controls are surprisingly very useful for certain cases.

The vertex baking is just a given for mobile development imo. As I mentioned in a earlier post in the same thread, Naughty Dog used this for the GI in Uncharted 2, its just so damn handy as an alternative to pixels bakes for AO and GI.

Memory/disk space and draw calls. Its imperative in mobile development that we minimise the number of draw calls especially for slower devices and we don’t have the luxury to use multiple lightmaps in a given scene. Plus it saves time when rendering the light bakes. Many times during a deadline we found that a new object added to a scene makes the light bake spill into multiple lightmaps which can be very frustrating.

2 Likes

Is it possible to just put Beast back into Unity for mobile developers who are unable to use any real time lighting - I get the impression that enlighten was designed as a real time lighting solution, this is all well and good if your developing for PC, PS4 or Xbone but what mobile and tablet developers? I think we have been forgotten about in favor of next gen tech :frowning:

1 Like

I asked this back in the beta phase and the answer I got was a straight no.

My guess is that Autodesk’s about-to-be-released Stingray engine, which supports Beast, has complicated things.

1 Like

One angle to consider would be using dynamic GI as intended but realtime shadows or at least baking shadow maps. This can be a very consistent memory usage (even update from time to time ie enter a new area) and offer brilliant visuals with realtime iteration. Overall a lot less ram used.

If you really want the baked workflow to be consistent and controllable, something like VRay will blow beast out of the water.

Both options require considerable effort on the developer’s part though :confused:

1 Like

I was using only uncompressed lightmaps and it was important to fit everything in one 1024 map. Especially for mobile, the ram usage/draw call increase that multiple lightmaps would create is not something I wanted.

I have lost countless hours putting the lowest settings I can, and slowly rising the texel resolution until it fit one 1k map as much as possible, but not more. I even did a feature request to have it automate that process. It’s super weird to hear that this was the original behaviour (which is very superior in my eyes) and was changed during alpha.

Why weren’t both methods available?

4 Likes

Has anyone successfully used UVs and Lightmaps baked and unwrapped outside of Unity 5? Is it technically possible? Can anyone help with the maintaining of the lightmap info on play or on build? It is lost currently for us.

@Mahoney014 “Unity’s Enlighten - baked lighting a big step backward from Beast.”

Well… maybe, but Unity pre computed real time GI is a BIG step forward :slight_smile: