Baked Lightmapping in Unity 5.0

I just wanted to throw this out there and see if I’m doing something wrong. I’m trying to bake some lightmaps for a low poly environment in Unity 5. I set the baked resolution to 5 and it’s taking forever to bake the lighting. I’ve turned off the precomputed realtime GI and Continuous Baking modes. Am I missing a setting or some optimization tip to make the lightmapping bake quickly like it did in 4.6 with Beast?

It’s a lot slower than Beast was without tweaking and even then slower

Yeah, light baking in Unity 5 is very slow, even on a fast computer.

1 Like

Camouflaj is giving advices to reduce bake time on their “Remastering Republique” article, in the Dev diary #4:
http://unity3d.com/journey-to-unity5-republique

Never tried it myself as I’ve read this article this morning but sure will try it once I get back home.

So what is the recommendation? I don’t do podcasts or vid tuts. Give me some text I can speed read through and refer back to as the process unfolds.

1 Like

It’s all text there if you click continue reading (not sure why such button exists).

Thank you guys for the links to reduce the bake times. It’s plain silly. I have an uber low poly environment using less than 10 textures and a single directional light. It was trying to bake the lightmap for more than an hour!! I just killed it after that. I’m on a 64 Bit Win 7 machine, 16GB of RAM, i7 CPU and a 2GB video card.

Duh… I will check back. I clicked chapter one and it was a podcast so I just closed the browser window.

Ah I found the hidden key to reducing bake times thanks to that link :
I’m going to tag this to help others : Unity 5 Enlighten Bake Time Fix

“You will want to set the Real Time GI settings for all the objects in your scene before you bake. If you don’t, you will have dramatically increased bake times. The best way to do this is going to your lighting tab and filtering by mesh renders. Then, grab all your geo, set the Auto UV Max Distance to a value of 2, and the UV Max Angle to 120. Finally, set the advanced parameters to Default-LowResolution. We have found these are good generic values and speed up render times dramatically.”

6 Likes

@JamesArndt1 what kinds of time decreases or your bake times itself have you experienced?

Well I killed off the first attempt after about 50 minutes so I cannot compare the times. After I adjusted those settings I was able to bake out my scene in about 10 minutes. Still quite a bit longer vs. the Beast system in 4.6. In Beast I set the resolution to something like 10 texels and it would bake in less than 60 seconds for quick testing.

2 Likes

OK… Hit bake and take a smoke break or make that next cup of espresso. Encouraging number though for all the folks who have had issues prior. Thanks for the input James.

Update : Started off this morning attempting a good quality bake. I changed the quality setting Advanced Parameters to “High Quality” for the mesh renderers in scene. I started this bake at 9:30 am, it’s now 12:50 PM and the bake is a bit more than half done.

You’ll have to forgive me, but what the heck is going on with the lightmapping bake times? With this kind of foolishness I think I’m just going to fall back on baking Lightmaps in Maya with Turtle.

@JamesArndt1 Prebaking is great except when you try to save bandwidth on textures and tile them. Does not the method that Republique used of doing the quick bake and then gaussian blur in PhotoShop not work?

Well my world is low poly, but it’s a race track so it extends pretty far out. With that said I tried to cover it with a single 1024x1024 texture from Photoshop. It was just too low resolution to cover my entire world. Now I’m attempting to bake out Maya lightmaps (using Turtle) for sections of the world, each section at 1024x1024 px and they are coming out pretty crisp. However, I now need to figure out a system for assigning the right lightmap texture per correct section. The world shares materials all across it, so currently applying a single section’s lightmap to a material causes it to appear correct in that one section and all jacked in others. I believe this is the lightmap “indexing” these systems do out of the box (Beast, Enlighten), but I need a manual method.

This actually would be an opportune time to request help from anyone with knowledge on a free setup that can basically properly “map” my lightmaps to the correct matching sections of the world (using Legacy Lightmap shader) without using Enlighten (Unity 5 built in lighting). I know there is a method of making unique materials for each section and that would open unique lightmap slots for each material instance. This is a mobile game, so that’s simply not an option.

Wow this is really the mystery of the universe :|, still have no idea what affecting the render time in enlighten, unlike beast which is kinda straight forward. IMO. .

I would like a very simple and straightforward guide to common settings and render times for certain quality bakes. Right now it’s really unusable and I am resorting to baking the maps in Maya. I don’t have time to iterate over 15 minute low quality bakes just to preview the low quality lighting. Yesterday, setting the bake to high quality resulted in Unity baking the entire work day… and no resulting maps because it didn’t finish.