I made a model of a small building, lit with HDR and some light planes. The walls are textured with images, normal maps etc The whole file is about 28mb. The 4 walls are separate meshes, and I am trying to bake the textures one wall at a time. I unwrap a wall section, create an image in the UV editor, add a new image texture node in the node editor, etc. and hit bake and every time Blender crashes immediately. If I copy and paste the wall section into a new Blender file it bakes just fine. The wall panel by itself is about 1.5mb. I have tried baking while in Object mode, Edit mode, to no avail. I'm just trying to bake one small mesh at a time so I don't understand if this is a memory problem? Using 2.79, Cycles, CPU.
-
$\begingroup$ what are pass you baking? $\endgroup$– DavidJan 24, 2018 at 15:01
-
$\begingroup$ I tried both Combined and Diffuse and have the same problem with both. I think it may be a problem with memory. I made a second (full copy) Scene so it included my model, lighting etc. and then deleted all objects except the exterior walls and their supporting objects and they baked just fine The only difference is that the second scene has fewer objects. I assumed that Blender only looks at the object that is being baked, not the whole file. If I need to break the model up into smaller pieces in order to bake that will add a lot of time to the process. $\endgroup$– TownhillJan 24, 2018 at 16:55
2 Answers
This may be standard practice but it works for me so I wanted to post it here. It seems that Blender looks at the render layer settings when baking. I have a bunch of detail in my file (wall framing, interior trim, furniture etc.) that doesn't effect the baked texture on, for instance, exterior walls.
so when I bake the exterior wall texture I exclude those items in the render layer panel. This seems to have eliminated the crashing problem. It's just important to be sure that none of the excluded layers would have contributed to the bake. In this case the exterior lighting casts shadow on the walls so that layer isn't excluded. There may be better ways of handling this but this is what I have found that works for me.
I had a similar problem but I remembered that the diffuse is just looking at the color of the object so I stopped the crashes by disabling the 'Direct' & 'Indirect' buttons in the bake tab.