Blender's texture baking design is extremely dangerous

In its current state, Blender’s texture baking design is extremely dangerous and can result in loss of lots of user data. Here’s an example case:

  1. You have an object with multiple materials, each of them having some textures
  2. You decide to bake simple AO/Cavity map for it
  3. You make a duplicate of the object for the purpose of baking, so you don’t modify desired materials of the original one.
  4. You create one more material slot, select all of the object faces, and assign them to have the new baking material
  5. You setup this new material with AO maps to create convex/concave masks for dirtmaps
  6. You create a new image texture to contain the baked information and select it to make it active for baking
  7. You set up and press bake

Now, you’d assume only actually used materials are being baked, since all the other material slots do not have even one face assigned, yet during the baking process, every single image texture node which is selected in ever material slot is now considered active, and therefore baking target.

Once you are done with baking, you proceed to use your baked texture. After some time passes, you decide to close the Blender. A popup window appears asking you if you want to save # of modified images. If you are unsuspecting user, and click yes, then you inevitably override all the source textures loaded from your hard drive with unintended baked data (usually pitch black) without any way to revert this. This means one click can irrecoverably destroy many textures user loaded in Blender without intention of ever modifying them.

I know baking overhaul is not a simple thing to accomplish, but before its done, some temporary fix should be introduced here to prevent users from accidentally destroying their texture libraries.

Right now, the main design issue is that it’s not obvious for many users that clicking bake button simply means “Override the data of all the image texture nodes in all the material slots of the currently selected objects if the image texture nodes are selected (have white outline around them).” Specifying image texture as a target baking should require way more explicit action than this.

1 Like

Hi.
Is the problem you pose covered by this design?
https://developer.blender.org/D3203

I don’t know, probably, but if you read my post, you see that I actually mention the overhaul, but it takes a long time, and it’s not done yet. There should be something to prevent data loss done a lot sooner than before the whole overhaul is complete.