9

If there are multiple objects with different materials that have been combined into one object, UV unwrapped together and texture baked, the result is glitchy at best. Here is my process:

  1. I start out with everything as a single material with a single UV map and multiple materials. There are three separate pieces in the combined mesh:

enter image description here

  1. I create a new material, a new 4096x4096 image, and a new UV map (through smart projection) that doesn't overlap. I select the image, the new material, the new UV map. Every piece of magic I can think of since I don't know exactly how the bake knows what to bake where:

enter image description here

  1. I click bake, with the sample size set to 256. Nothing is baked to the image I created and selected:

enter image description here

  1. Some stuff baked, but not all of it, and what little was baked was baked to two new images it created:

enter image description here

I don't know what's going on here.

AaronF
  • 353
  • 1
  • 2
  • 13

2 Answers2

17

To make this work properly, you need to have an active Image Texture with your new image file in each material you have in this model.

Basically, what you have to do now, is to Ctrl + C on Image Texture in Everything material, visit each other material and Ctrl + V.

Then baking will give you appropriate result.

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187
Mzidare
  • 4,280
  • 1
  • 10
  • 24
  • Thank you. Worked like a charm and lifted a bit of the mystery about how texture info flows through blender. – AaronF Oct 03 '17 at 18:15
  • If I want to re-bake, is there a quick way to select all the same texture nodes in every material? Right now I have to cycle through all my objects and manually click on every texture node before hitting bake – Andy Ray Mar 01 '20 at 21:02
  • This isn't working for me. I have two materials in wto slots in the same mesh, and I have the node with the image I'm baking onto in the two materials. It's also highlighted in both. But when I bake, only the first slot actually is baked on the image. – Alexandre Marcati Sep 20 '21 at 02:36
5

There is an addon called Principled Baker. It creates a new Image Texture for every material and selects them then bakes all the materials in to textures according to PBR material workflows. It is a free addon and works for both 2.79 and 2.80.

Harry McKenzie
  • 10,995
  • 8
  • 23
  • 51
Berk Altuğ
  • 61
  • 1
  • 2