Principled Baker - Bake PBR textures with a few clicks

Hey out there!
I’m having 2 persistent issues:

the setup:

  • Windows 10, Blender 2.83, Principled Baker 0.5.5
  • 1 object with 4 materials (each color/met/rough/normal)
  • Combined mode
  • Bake Types detected (correctly)
  • Prefix

path issue:

  • setting any output path via file picker, or
  • manually setting relative path (eg. “//testbake”), or
  • leaving path default (//)
    all result in:
    Runtime Error: Error: Image “image name” could not be saved to “that path”.

bake issue:

  • leaving path default (//) and enabling the ‘Texture Folder’ option
    will start the bake, but results in:
    UnboundLocalError: local variable ‘new_output’ referenced before assignment

Any thoughts are much appreciated!

(edited for sanity and precision)

1 Like

Looks like the add-on doesn’t work in 2.9 anymore.

1 Like

Yes, a fix for 2.9 would be much appreciated !
Color bake doesn’t work as intended by the way. Default blender Diffuse bake works fine. It looks like the Principled baker doesn’t take into consideration the mixing between multiple Principled BSDFs.

1 Like

There’s an easy fix for this. Screenshot taken from github issues tab

(visit the issue to copy and paste the code)

2 Likes

Sorry for the late reply. :frowning:
When you have over a dozen projects in different languages running parallel plus other stuff, you’re losing track.
So, I thought I take the weekend to finally update the add-on. But – of course – my keyboard broke on Saturday.

I worked the last two days to finally update to Blender 2.83/2.90. The partially rewrite took way longer I thought. I’m currently fixing the last three bugs, I found.
No promises, but it should be done this week.

1 Like

update version 0.5.6:

  • fixed: not working with Blender 2.9
  • fixed: high overhead with many materials
  • fixed: wrong color space for loaded image, if not overwritten
  • fixed: wrong color from mix nodes with AO
  • fixed: no check for missing UV map
  • potential backwards compatibility for Blender 2.79 removed
  • changes in UI
  • panels reordered
  • Additional Bake Types moved to own panel
  • copy modifiers option for duplicate objects

The path issues should be fixed now, too (with pathlib).
I could not test on Windows! (I don’t have Windows anymore since 7 has been discontinued.)

4 Likes

Maybe I’m doing something wrong, but all I get is black images instead of bakes, no matter which settings I try on Windows 10.

Unfortunately I still can’t bake in 2.9. Installing the addon works now, and the bake list updates correctly as well, but no matter what I set as my output folder, I always get a “No write permission” error. I’m on Win10.

I wrote a quick fix/workaround for the missing write permission for windows, again… :expressionless:
I don’t know if it works. I can not test with windows!

It doesn’t work for me since 2.9, even with the update. This is the most useful Blender addon for me, I really miss it.

RuntimeError: Error: Image ‘Cube_color.png’ could not be saved to ‘\Cube_color.png’

location: :-1

What’s wrong? Help

Maybe people here you want to use the Principled Baker can start a GoFundMe to buy Daniel a copy of Windows 10?

1 Like

Oh, please don’t! I’m happy I got rid of Windows. :smiley:
Also, I will not waste a single dime for Windows 10. Not mine, nor someones else.

Maybe it is possible to get Blender started on a Windows in a virtual machine like Virtual Box. But I think OpenGL will be an issue.
Or I look for an old hard disk and install Windows 7 there.

1 Like

Yonsh wrote a fix for the path error.

Thanks, Yonsh!

btw: I installed Windows 7 in a Virtual Box. Blender 2.8+ does not run. As expected: No OpenGL 3.3.
Blender 2.79 runs and I was able to write a fix. But Yonsh was faster. :grin:

1 Like

Hi Daniel,

What a great tool! Thank you very much for sharing! IThat will make my life in blender a lot easier…

One question: If “new material” is selected one has to enter a material name…
Is it possible to autogenerate a material name from the existing one by not giving the material name but

  • say - a extension. Example:
    Current PBR material: Brick_wall
    Given extension : _baked
    Created new material: Brick_wall_baked

If it is not possible…may I ask to add this feature?
Thanks a lot for the addon! You made one of the best bakeries ! :slight_smile:

Additional question/request:
When doing a batch-bake with “create new material” and “add new material” each object gets a
new material - but the “old” one is still applied to the object. Is there a way to automatically
activate the newly baked/created material? …otherwise one has to step through each of the batch-baked object manually and switch to the new materials.

Cheers!
tuxic

Unfortunately in Blender 2.90.1 (Windows 10) i have this error message:

"Traceback (most recent call last):
File “C:\Users\gadas-pc\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\Principled-Baker-master\baker.py”, line 869, in execute
self.bake_combined(context, self.bake_objects)
File “C:\Users\gadas-pc\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\Principled-Baker-master\baker.py”, line 564, in bake_combined
bake_type=get_bake_type_by(self.jobname))
File “C:\Users\gadas-pc\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\Principled-Baker-master\baker.py”, line 293, in bake_and_save
image.save()
RuntimeError: Error: Image ‘KIWI PROCEDURAL_color.tif’ could not be saved to ‘\KIWI PROCEDURAL_color.tif’

location: :-1"

Someone on github suggested that when you choose your file path, just replace “C:\your\file\path” with “\your\file\path”. It worked for me in both 2.90.1 and 2.92 alpha.

Thank you @danielenger making this addon simple and clean to use

This addon work parfect in 2.9.1 there is one thing i missing no progress bar or indcator as blender internal baking system when i bake it show blender freeze a

anyone can help in this

after all

already have version for blender 2.90?
where do i download?

Windows 10 is free to use without a product key at the cost of a watermark and forced default desktop background. Just skip the product key input when you install it. You aren’t forced to pay for it. That said, grats dumping windows from your daily life. I dual boot, but only run windows when I have to.

I kindly need some help here (using Blender 2.91):

I’d like to bake two objects into one material. Both have two UV maps, an individual one and one unwrapped together. The individual one is active, the shared one selected. Baking individually works but as soon as both objects are selected I only get the active one baked, using the shared UV map.

Using the standard blender baking workflow where I have to put the image to bake to into each material works for a combined bake. What could be going wrong?

1 Like