Principled Baker - Bake PBR textures with a few clicks (for 2.80 and 2.79)

Please could it possible to fix this? When you baking few objects on the same UV space to get one map for item that consists few separated objects your addon bake maps for each obect. In standard baker you just bake so many objects as you want and get one map. Would be cool to get option (checker box) like “Bake maps for individual objects” or something like this. And if user wish he can bake for every selected object by map, but by default addon going to bake in general map all selected objects.

Thanks for your input! I know the results from shared UV space is an issue. I’ll try to tackle this in one of the next updates.
I wasn’t sure how to implement this in a (at least half) user friendly way. I think “Bake maps for individual objects” (what the add-on currently does) as option is a good idea. That the current behavior is different to what blender does, is a good point, too, because it’s unexpected behavior. Also, who doesn’t like new features. :smile:
This will be the three bake modes:

  • bake shared (standard; not sure how to name it)
  • bake individual single/batch (as it is now) as option
  • bake selected to active

update 0.2.4:

  • 3 bake modes: Combined, Single/Batch, Selected to Active
  • Material ID (two methods to define Material ID Colors; see Addon Preferences)
  • Auto Lightmap Pack option
  • fixed: Selected to Active samples not working
  • fixed: shared material color always white
  • fixed: Selected to Active prefix

This update changes the default behavior!

  • Combined (new default): Bake a single selected object or bake multiple selected objects with shared UV maps. This is like Blenders default bake.
  • Single/Batch (previous default): Bake every selected object separately.
  • Selected to Active: Does what it says.

Limitaions:

  • Auto Smart UV Project not available in Blender 2.79 for multiple objects (bake mode: Combined)
  • with Material Name to define the Material ID Colors: Duplicate colors are possible! I found ~6500 in an english dictionary with ~466.000 words.

I hope everything works fine. :slight_smile:

Is “_MatID” a good default suffix for a material ID map?

1 Like

Hi,
When I select multiple objects and bake “Combined” it combines normalmaps, but color, roughness and metal are baked only from last selected object.

This happens when you release in a rush. :roll_eyes:
I’ll fix it. Just be a little patient this time. I’m rewriting parts of the add-on, because it got bigger than originally planned and the new features are just “squeezed in”.

update 0.2.5:

  • baking in Eevee/Workbench by temporarily switching to Cycles - This may crash Blender 2.80 beta!
  • Create New Material/Add New Material as two separat options
  • Mapping and Texture Coordinate nodes for new material
  • fixed: results in Combined mode partially black
  • fixed: Vertex Color baking only with material
  • fixed: empty material slot removal
  • fixed: color outputs in factor inputs not BW
  • fixed: wrong material ID colors with shared materials (by slot/hue)

Warning:
Baking “in” Eevee did crash Blender 2.80 beta sometimes! I had no crashes with the recent builds while testing.


As always, I hope everything works fine and I didn’t miss a test.

1 Like

update 0.2.6

  • fixed: ‘image’ referenced before assignment without Create New Material

update 0.2.7

  • bake diffuse direct/indirect (only for Combined and Single/Batch, does not work properly for Selected to Active)
  • influence settings for normals working (see Render (tab) > Bake > Bake Type = Normal > Influence)
1 Like

update 0.2.8

  • update to changes in Image nodes and Principled BSDF nodes in Blender 2.80

Update the add-on, if you use one of the recent Blender 2.80 beta builds!

1 Like

update 0.2.9

  • fixed: non-mesh objects in selected objects causing problems

The add-on is not working with current blender 2.80 beta build (May 17). Please wait or use older build. Test with build from May 14 was working.

update 0.3.0

  • fixed: diffuse image colorspace not in sRGB

The add-on should work fine now with the recent builds.

update 0.3.1

  • Select UV Map to bake on
  • minor UI changes
2 Likes

update 0.3.2

  • Bake List for manual selection of Bake Types
  • detection of Bake Types for Bake List from selected objects
  • presets for Bake List
  • removed BW from color mode
  • UI changes
  • fixed: missing custom suffixes (are part of Bake List)

Known issue in Blender 2.79: Bake List is in random order.

4 Likes

Big thanks for your hard work.

1 Like

Thank you for this fantastic addon. I really appreciate it.

One thing that I noticed: When baking a (procedurally textured, non-unwrapped) high-poly mesh to a low-poly one, I’m getting an error : “baking cancelled. ‘HighPoly’ UV map missing.” Adding an empty UV map solves it.

1 Like

That’s a bug.
There is also a bug with wrong colors with 16/32 float images.
I’ll fix them as soon as possible.

1 Like

update 0.3.3

  • UI change: Bake List below bake button and bake mode to make scrolling less annoying
  • Ambient Occlusion removed from Bake List in Blender 2.79 (AO not supported in 2.79)
  • Bump (Height) removed from Bake List (is in Additional Bake Types)
  • fixed: 16/32 bit float images wrong colors (from view transform)
  • fixed: missing compression for PNG
  • fixed: codec for OPEN_EXR, codec for TIFF, quality for JPG not working
  • fixed: Selected to Active UV Map check for selected objects
  • fixed: save in wrong path with relative path in Blender 2.79
  • fixed: missing check for selected Diffuse passes
  • fixed: missing suffixes
4 Likes

A question about this addon.
I’ve an object with 5 materials assigned.
4 of them are simple principled material with just different colors and different specular&glossiness values.
1 of them has a texture in the opacity and one in bump.

I’d like to bake all the material in one material with all the colors and maps in one single map (for every channel: one diffuse, one glossiness, one specular and so on).

Is it this addon useful for this?

That’s what the add-on is made for.

In the shown example are 5 materials assigned to different faces of an icosphere (left side). On the right side is the baked result with one material and 5 texture maps.
The first 4 materials differ only in color, roughness and specular. Material 5 has a linked texture in the alpha input and a linked bump node in the normal input of the principled node.
The add-on detects automatically (or by clicking on the ‘Detect’ button), what differs and what is connected:

  • color
  • roughness (plus glossiness selected manually)
  • specular
  • alpha
  • bump (baked as normal map in the example)

To make sure you always bake the wanted channels - even if they don’t differ, select the channels in the list by hand.

I can’t make it work for some reason. All I got is a black texture and what I think is an error in the Image Editor. No errors on console tho.
Using Blender Master Build.

This is a bug, that makes the add-on unusable right now!

This bug does not appear with blender started from Visual Studio Code with Blender Development extension. I wasn’t using the add-on outside development in the last weeks. That’s why I didn’t stumble over this big bug. I’ll try to fix it the next days.

That really sucks!