Principled Baker (for blender 2.8 and 2.79) (bake PBR textures from Principled BSDF nodes)

texturing
add-ons
free

(DanielEngler) #1

Principled Baker add-on helps you bake all inputs of Principled BSDFs (and other) to image textures.

Features:

  • Autodetect of what needs to be baked
    – Bake only linked inputs of Principled BSDFs (and other surface shaders)
    and
    – Bake inputs with values that differ in different nodes
  • Manual selection for texture channels
  • Bake single
  • Bake Batch
  • Bake Selected to Active

Limitations:

  • Baking works in Cycles only. (for now)

  • Displacement works only with a Displacement node.
    Vector Displacement does not work.

  • Color inputs of transparent nodes (Transparent, Translucent, Glass) will be ignored by default.
    This prevents false colors at transitions from being baked into the Color Texture.
    Deactivate “Exclude Transparent Colors” to bake transparent inputs to Color Texture.

  • Autodetection:
    If just a Bump node is in the node tree, the Normal Map will always be baked.
    If a Normal Map and a Bump Map is baked, the Bump node will not be linked in newly created material.

  • Some results from complex mixed shader node trees might not be useful.

  • known issues:
    Mix with emission node not working! (versions 0.1.5 to 0.1.8) will be fixed
    – results for Subsurface Radius is not useful
    – results for Tangent might not be useful
    – batch baking with shared materials gives useless, half baked image textures
    – typo in github name (can not be solved)


Version for Belnder 2.79 is outdated! Please wait for backport!
Principled Baker (version 0.1.2) for Blender 2.79 here: https://github.com/danielenger/Principled-Baker_for_2-79


update 0.1.8:
new: Auto Smart UV Project
bugfix: no UV map as potential input error

update 0.1.7:
bugfix: margin not applied

update 0.1.6:
bugfix: file paths
other bugfixes

update 0.1.5:
autodetection: support for more shader nodes
new UI
bugfixes

update 0.1.4:
fixed: missing bake button

update 0.1.3:
port to blender 2.8

update 0.1.2:
new: alpha channel to color (optional)
fixed: alpha channel color space

update 0.1.1:
fixed: alpha color space not sRGB

update 0.1.0:
new: batch baking
new: selected to active baking
new: better auto detection
new: support for multiply materials
new: copy values of Principled BSDF nodes to Principled BSDF node in (optional) new material
new: optional alpha channel (know issue: previously created images without alpha channel need to be deleted by hand to get alpha channel)
fixed: linear color space for values

update 0.0.6:
fixed: wrong baked colors from non-color data image nodes

update 0.0.5:
new: optional bake bump maps to normal maps

update 0.0.4:
new: optional new Material

(puns are intended)


How bake cycles material to PBR texture
Save bake image as 32 bit float?
(joseph raccoon) #2

I think I shall make use of this.


(Craig Jones) #3

Interesting, thank you for this!


(urkokul) #4

Usefull thing. Thanks


(joseph raccoon) #5

I would love to see this in eevee after 2.8 is stable.


(PixelPete) #6

This is fantastic. Nice job, thanks for sharing Daniel!
If we had an option for the rendered textures to autoimport into the scene and replace the existing nodeinputs (those replaced once wouldn´t have to be deleted, just disconnected and kept in case you want to tweak their values again), we would pretty much have the basics of a true substance painter like workflow inside of Blender, only potentially more powerful because of all the possibilities of rgb-maths and vector-maths. We´re getting close people :eyebrowlift:


(Spirou4D) #7

Thanks DanielEngler, a really nice idea!
Congrats. :yes:


(kabu) #8

Hello, look like very neat.
I receive an error on install:


Os X, Blender 2.79/2.79a


(DanielEngler) #9

Thank you!
Darn it! I somehow deleted “category” from bl_info.

Important! Download the update 0.0.2!


(DanielEngler) #10

Yes! Me, too! Officially build in the first place and not just as an addon with hacky code. :slight_smile:

Good idea. I’ll keep that in mind for the next update. Let me think: Maybe with an other Principled BSDF node in the material with all the baked textures connected to not to destroy anything. than I need to tag the source principled BSDF node and the new one and store the tags. maybe with custom properties. Anyway, I’ll find a solution. :slight_smile:


(DanielEngler) #11

new in update 0.0.3:
Optional new Principled BSDF node for manual preview.

There is a known bug: Overwrite with an other resolution does not work. The workaround is to remove the image nodes and all users from the textures and restart/revert.


(DanielEngler) #12

update 0.0.4:
new: optional new Material

removed: optional new Principled BSDF node for manual preview

fixed: overwrite with new resolution bug


(DanielEngler) #13

update 0.0.5:
new: optional bake bump maps to normal maps


(renderhjs) #14

I like this, would be nice to see some practical screenshots / examples. Seen a similar paid script recently as well. This will be very useful when EEVEE is used more frequent by users.
You might almost want the reverse path as well, create or update a BSDF material based on images in a folder. That way you could push back and forth textures between different tools or apps. Might look into this idea myself as well in the future.

Thanks for sharing!!!


(DanielEngler) #15

Maybe I should make a tutorial with a simplified example, so people can quicker understand, what the add-on does and what it’s good for and what not, and how to use it.

What’s the name of that script?

So, basically the functionalities “Add Principled Setup” and “Reload Images” from Node Wrangler, but with a single click on a button based on the name of the used texture.
Well, I think this would be more suitable for an other add-on, because I think this would be out of the functionality of Principled Baker. But I’ll put this on the maybe feature list. :slight_smile:

Thanks for your feedback! Now, I have to make a tutorial. :stuck_out_tongue:


(renderhjs) #16

Bakery-Bake-Cycles-Materials-to-PBR-Textures
It seems to focus on Any Cycles materials with a custom node wrapper- but I assume that it is the same idea.


How to make new Material Output node the active one?
(DanielEngler) #17

Yes, same idea - different approaches.


(DanielEngler) #18

update 0.0.6:
fixed: wrong baked colors from non-color data image nodes


(DanielEngler) #19

update 0.1.0:
new: batch baking
new: selected to active baking
new: better auto detection
new: support for multiply materials
new: copy values of Principled BSDF nodes to Principled BSDF node in (optional) new material
new: optional alpha channel (know issue: previously created images without alpha channel need to be deleted by hand to get alpha channel)

fixed: linear color space for values


Well, I hope everything works fine now.


(DanielEngler) #20

update 0.1.2:
new: alpha channel to color (optional)
fixed: alpha channel color space