Lighting Modes - out of memory - bake selected?

The new lighting modes look great, and are very promising from the results I’ve seen in the little test scenes I’ve put together. I’m having trouble baking my first real scene though. I keep running out of memory and having Unity crash. From what I’ve read, the solution to this sort of thing for large scenes in the past has been to use “Bake Selected” and bake your scene in chunks. This doesn’t seem to be an option with the new lighting modes, however (unless the button has just been moved and I’ve missed it). Is there a way to do something like the old “Bake Selected” option? Or if not, is there another way to overcome memory limitations with the new system?

Thanks!

Bake Selected was only available in the Unity 4.x builds but has not been brought forward into 5.x unfortunately. If possible could you file a bug and attach the scenes you’re getting the crash with and provide us with any other details? Stuff like amount of system memory, cache size, etc. Thanks!

Hey @CodeBison

As Shawn said, we would appreciate if you can share more details. For instance, can you specify which platform you are using?

Thanks!

Ah, cache settings! I’d forgotten about those since I haven’t done any baked lighting since my initial tinkering with 5.0. I had my cache size set to max 10GB. I’ve moved this to another drive and increased the limit. I’ll let you know how it goes.

In case it’s helpful, here are some details about my project and config:

  • Dev platform: Windows x64
  • Target: Windows x64
  • System RAM: 16GB
  • GI Cache: 10GB (now changed to 200)

Lighting Config:

  • Dynamic Lighting: Disabled
  • Stationary Lighting: Enabled
  • Mode: Distance Shadowmask (remainder of Lighting settings at defaults

Scene details:

  • Stationary lights: 179
  • Static meshes: 2964

Out of curiosity, what’s the criteria for which lighting mode gets set on lights by default? Most of my lights ended up Stationary, bot some were Dynamic even though they were set static.

Thanks!

Increasing cache size made no difference. My cache folder is only 1.7GB, but my system still runs out of RAM while baking and Unity crashes.

I’ll try and pull out the elements of my scene into a repro project so I can post a meaningful bug.

I’m also getting run out of memory when baking

@CodeBison , @Reanimate_L - if both of you could zip up the scenes, submit a bug and let me know the bug # I’ll take a look into it with the team to find out what’s going on. Thanks!

@CodeBison , @Reanimate_L - Are you using any custom shaders in your projects or only standard shader? If you’re using surface shader, they should be upgraded automatically but this is not the case if you created your custom shaders using traditional vertex/fragment shader approach. So when you are available, it would really be appreciated if you can provide a reproducible project.

i would like to, but i cannot repro the problem anymore :s

Well, that’s good news. For future reference, it’s worth mentioning here that sometimes you have to delete Library folder from your project while upgrading. This may also fix some of the issues you encounter.

Thanks!