32bit, Beast, Dual Lightmapping

Hey guys,

We’re currently running into a pretty big problem problem here… I just tried to bake our whole map for the fourth time now, but Unity keeps crashing if we actually want to do a full bake. It works fine if it’s just a handful of meshes, it even works fine if we just bake half of the map - but trying to bake lightmaps for the whole map leads to a crash, every single time.

Now, how do we solve this? My guess is that Unity just runs out of memory and crashes. The map isn’t UBER huge, but it has a good size. I can’t just bake in batches, cause Unity overwrites old lightmaps with every new bake. So how would we do this now? It’d be optimal if could just bake half of the map, then go ahead and bake the other half - but that’s not possible in Unity right now.

We really need to find a way of how to bake lightmaps for the whole map ASAP - so any help would be appreciated.

you likely have told it to have too high details for the memory you have at hand (<= 4GB and that only if you are on a 64bit os or osx and have 6GB+ of ram)

also don’t forget that the assets of the projects are loaded, so you might want to consider using a batchline command script to let the editor fire up the calcs etc without having the whole assets loaded …

alternatively, don’t bake the whole scene but instead part by part and use the script a user here posted which lets you transfer the old ones before the next bake takes place to prevent them from being lost.

thats it options wise, you can not do anything else like staged baking etc

If not done yet, please dedicate some votes to the 64bit editor request on http://feedback.unity3d.com :slight_smile:

I’m on a 64bit Win7 with 16gb RAM. Doesn’t help though if Unity / Beast are 32bit applications.

I think the script that user posted doesn’t work with Dual Lightmapping now, does it? We really need dual lightmapping.

This puts us into a really bad spot - we have a big deadline coming up and unity just crashing without any error notes or without being able to isolate and workaround the problem means we’re in a bit of a bind.

There isn’t a workaround. It just runs out of memory and crashes. the only way to prevent that is using less memory, which means lower texel density etc.

Dual Lightmapping indeed makes it more ugly as it will eat another 50%+ more memory.

The editor batchscript usage might be the only way to go here to prevent unity from loading all the assets but I’m unsure if its possible at all for beast (for building its the normal way to avoid the out of memory crashes for much longer)

as for the machine: thats why I added the edit, please vote for 64bit editor :slight_smile: (I’m sitting on a 64bit Win7 myself and have been on 64bit windows for some years now)

Would it be possible to export the entire map to something like 3ds max and render the dual lightmaps there?

Not sure how many lights you would have to match to Unity and how hard it will be to set up the scene again in ie. 3ds max, but it could work? :slight_smile:

Edit: Btw, If there’s a script out there that let’s you bake your map in sections why won’t it work with dual lightmaps? Isn’t dual lightmaps just 2 sets of lightmaps, one with just GI and one with shadows?

Hi man!
Not cool to hear youre having those problems with Beast, but its not easy to say what`s causing it without having a look at the scene. If you could either file a bug or pm me directly, we could try to solve this issue.

Cheers,

Roald

Potentially but I don’t think that too many worked on this aspect.

And Dual Lightmap is more than just that.
its actually 2 sets of lightmaps among other things, unsure if it can be replicated just like that.

Has anyone found a solution for this yet? I have the exact problem and was wondering if there is already an answer.

Is it possible to bake the scene in sections and edit it back together in photoshop? Also do you mind elaborating on the process in preventing the scene’s assets being loaded up to save memory? (I assume this is similar to a command line Maya render operation?)