Bake Wrangler - Node based baking tool set

Bake Wrangler is a nodes based extension and replacement for the inbuilt baking system. The aim is to provide a highly configurable but easy to use baking system with all the extra features you really wish you had.

Direct Download: BakeWrangler_1_0_RC6.zip
Support development by donating at: www.ko-fi.com/bakewrangler
Or use Gumroad: https://gumroad.com/l/esrjv

@amdj1 has created a video tutorial: YouTube Tutorial

Bake Wrangler 1.0 RC6 (release candidate 6):
The ‘subsurface’ issue with b2.83 wasn’t completely fixed in the last version (combined pass still tried to use it). I also accidentally added some small features. Cavity pass now has a inverted version I’m calling ‘Edge Mode’ (because it’s basically only useful for finding the edges?). I also didn’t like having to type in file names, so now you can use the file browser for the name if it’s an existing file.

Bake Wrangler 1.0 RC5 (release candidate 5):
Okay this is it! What I expect will be the first stable release of the add-on. No new features are present and none will be added to this version. But I’ve added a whole bunch of preferences to set up your default node values along with a few other behaviours. Also the node layouts have been refined quite a bit with the more advanced and less used options now starting collapsed under a header, reducing node foot prints quite a bit.

Bake Wrangler 1.0 RC4 (release candidate 4):
A couple of small bug fixes to support 2.83 blender release. The Subsurface bake pass is no longer supported in blender (unsure as to why?), but I’ve disabled it for now. All my tests are showing everything
to be working properly in 2.83 with this version, so if you have any issues please let me know!

Bake Wrangler 1.0 RC3 (release candidate 3):
This should be last update other than bug fixes before release. There are a couple of small changes to the UI along with some better logic when determining what passes to perform to generate an image.

When multiple passes make up a single texture the default is now to generate all of them first then combine and save them in a single step, which improves performance especially when dealing with Alpha channels. The old behaviour can still be enabled via preferences to save after each pass.

User documentation can also now be accessed from the add-on panel and is mostly complete. If you would be willing to translate to another language please contact me!

Bake Wrangler 1.0 RC2 (release candidate 2):
Just a small update, adding the ability to deal with ‘Reroute’ nodes both in Bake Trees and Materials (While I don’t have reroutes in the node list, you can always split an existing link into a reroute by holding Shift+Right Drag through the link).

I have one more change planned for this version, which is the option to post pone saving the image when there are inputs to multiple channels. Which will slightly increase performance in those cases.

Bake Wrangler 1.0 RC1 (release candidate 1):
A couple of bug fixes but actually some pretty big changes from the first RC under-the-hood. The quick run down of changes is:

  • Color space issues fixed
  • Bake passes that can use scene lighting crashing fixed (combined, diffuse, glossy, etc)
  • Some changes to Curvature pass
  • With ‘Debug’ option enabled, the full process log will automatically open in a new window if the bake crashes or has an error. (To make it easier to post logs)

The new system has to handle alpha channels separately, which means a slight slow down if you need an alpha channel on your output. I still have one change to come dealing with reroute nodes and maybe a slight change to the alpha system.

Bake Wrangler 1.0 RC (release candidate 0):
We are getting to what is likely to be the last of the beta releases, other than bug fixes. All the core features are implemented and a lot of the baking code has been re-factored or rewritten either for performance to facilitate future features. The major changes you will notice (other than bug fixes) are:

  • New message output. The default will pop up a text window when you start a new bake. This can be controlled from preferences. If you disable the pop-up you can still view the progress by opening a text editor window and viewing the “BakeWrangler” file. Messages are of course still sent to the console and the new stuff can be disabled in prefs if you don’t like it.
  • Performance is greatly increased for file output, you will notice simple bakes finish much quicker now.
  • New options have been added to the Bake Pass to use your world and render settings along with the option for 32 Bit Float output (note that if you use the Float buffer, baking things like normals to something other than Non-Color will result in weirdness)

All this means that soon(ish) the ‘Beta’ product will go away. The release version will launch on both Gumroad and BlenderMarket in the next month or so hopefully. Anyone who has donated or provided support with testing and developing will get a code or something to access the new product.

I still have more planned for the future with addition bake types, ease of use improvements, etc.

Bake Wrangler beta 0.9.5.2 (bugsplat):
Mostly just a bug fix update. Not what I was planning for the next release, but I was made aware of a number of issues that seemed important!

  1. Some modifiers weren’t working properly (booleans any way). This is a blender issue which seems to only exist when doing background stuff. Actually there seems to be a number of bugs in blenders background processing. Any way I have a workaround which seems to solve it now.
  2. Using translations were causing bakes to fail. That seemed pretty bad. It should be all fixed now by using UTF-8 input and output.

There are a couple of other things like adding the PBR Specular pass, some UI stuff like updating lables to reflect the selected bake pass and I’ve renamed the inputs to Target and Source since people complained about Active and Selected (you may need to restart blender after updating for that change to work).

Bake Wrangler beta 0.9.5 (objectify):
Major change to the node set up. ‘Bake From’ node is gone, replaced by Object List. Mesh node is changed to support the new system.
The Mesh node now takes 3 inputs which can either be single objects or any combination of the Object List node. The inputs are ‘Active’, ‘Selected’ and ‘Scene’:

Active: Only uses ‘MESH’ type objects and anything connected here is treated as the target object of the bake.

Selected: Can now accept any object type and everything connected will part of the selection when baking. There is a caveat here that some weird blender bug was causing crashes with Meta and Surf objects but only depending on their list order. To bypass it everything is converted to a Mesh, which means your objects Viewport settings will be used rather than render settings. Keep that in mind.

Scene: New input that will place these objects into the bake, but not select them in any way. This lets you add lights and such if you want to bake cast shadows or the like.

The Object List node has a filter to choose what object types to show and can be switched to Collections. UV maps and Cages can be set per object in the list.

This all adds up to allow more flexibility in your baking and potentially use a lot fewer nodes if you only have simple needs. New node trees will also start with a basic set up and out of date node trees will be automatically updated the first time they are opened. Please let me know of any issues with the auto tree update and if any node set ups cause crashes!

Bake Wrangler beta 0.9.4 (curvycavity):
Added three new bake types:

  • Cavity (experimental)
  • Curvature
  • Curvature Smoothed

The cavity pass is a bit slow, but I think it produces better/more accurate results than some other methods. Try it out on different models and tell me what you think?

This is probably the last update before I make a bunch of changes to the node tree. Auto updating old trees to the new one could be a problem, so a warning that previously saved trees may not work in future. But I will see what can be done.

Bake Wrangler beta 0.9.3 (mixer):
Added support for Principled materials that use Mix Shaders. Are any other material configurations needed?

Also fixed a bug where baking multiple objects using a single PBR pass would cause objects after the first to return their Emit channel instead of the selected one.

Next I plan to make some significant changes to the node tree to allow adding multiple ‘low poly’ objects to a pass as well as scene elements (lights, etc) that can contribute indirectly to a pass. I’m also strongly thinking about moving feedback away from the console.

What bake passes do people want that are not currently supported? Especially any Principled node channels that aren’t currently exposed?

Bake Wrangler beta 0.9.1 (batch-cooking):
This update is all about batch baking. Output Image nodes can now be connected to a Batch Bake node to perform all your bakes with one click:
bake_wrangler-batch
This is one of the last major features I wanted to add. I want to focus on polishing things up and tweaking minor features in preperation for non-beta release. So please report any out standing bugs and request tweaks/polish that you think is missing!

-Point 1 update:
Preference loading problem should be fixed now. Also added a work-around to try to maintain file dirty status along with the ability to select which UV map to use if the object has more than one.

-Point 2 update:
Preferences should really be fixed this time!

Bake Wrangler beta 0.8.2 (collectionbake):
Two major changes in this update. Firstly the way color spaces are handled has been changed as an undesirable side effect was introduced due to changes in 0.7 which meant the gamma setting was being applied to saved images. Color spaces should now be correct in saved images.

Secondly the High Poly node has been renamed and reworked to ‘Bake From’ node. It now has the ability to select non-empty Collections and the option to include sub-collections. Curves have also been added as a valid object type. This mostly happened thanks to @Darknoodles contributing some code and testing the workflow.

The main missing features as I see it now are the batch baking node and some ability to deal with mix shaders. Please report any bugs or work flow issues you have so they can be ironed out for the 1.0 release.

Bake Wrangler beta 0.8 (bakeimage):
Apologies, it has been a while between updates. However it’s sometimes difficult to find time to work on projects that don’t put food in my stomach.

This update brings the ‘Bake Image’ work flow into play (the button on the Output Image Path node that has been disabled all this time). I’m not sure how useful people will find it, but I think it’s good for when you just want to update one bake in your project.

The ‘Color’ socket should always be generated first (if it’s connected), the order of the other channels depends on your node set up. But their processing order shouldn’t matter.

The build passes all my tests and there isn’t a large amount of new logic, but as always please report any bugs here!

Bake Wrangler beta 0.7 (imageset):
Adds support for all image format settings. Output to alpha channel will now work when using a format that supports alpha.

  • Choose Color Space (sRGB, Linear, Non-Color, etc)
  • Choose format (BW, RGB, RGBA)
  • Choose depth (8, 16, 32, etc)

Note: There are a lot of possible settings and I haven’t tested all the combinations, but they should be working. Report if you find any problems!

Bake Wrangler beta 0.6.1 (imagespeed):
Small update to fix an issue with multires and masks. Also improved the speed of the image manipulation step and made connections to image channels behave in a more useful and sensibile way:

Color socket to a R/G/B socket will now take that color (eg Color to B socket will take B channel from the Color). Channel (R/G/B) socket to a Color socket works the same, but in reverse (eg B to Color socket will write B channel to the Color).

Bake Wrangler beta 0.6:

This update fixes a number of bugs, improves the UI and feed back along with new features to fully support all bake types and options. This version should be much more robust and handle many weird cases that would cause the previous version to fail.

  • All built-in bake types supported with all options.
  • Additional bake passes for Principled shader: Albedo, Metalness
  • Bake and Save at different resolutions
  • Bake directly to specific image channels (alpha currently not working)
  • Masking with separate sample count for baking multiple passes to one image
  • Support for Multires and Cages
  • All baking takes place in the background using a separate copy of the data. Nothing is changed in your scene and you can continue working while images bake without problems.

Planned Features (by 1.0 release):

  • Implement the ‘Bake Image’ work flow (currently only ‘Bake Pass’ workflow is enabled)
  • Full batch grouping support to bake multiple passes and/or images with a single button

Desired Features (depending on community support):

  • As part of batch support, one click previewing of baked textures on selected model
  • Selecting of Collections in addition to objects (big time saving for very large projects)
  • Automatic file naming for batch output (%O, etc)
  • Additional node types for cleaner layouts, rerouting, grouping, etc
  • Additional post processing nodes, like Anti-aliasing (can already sort of do this by baking and saving at different sizes)
  • Add selected to High Poly node
  • Extra features as desired and requested by the users
52 Likes

When I send a file as fbx to another program are the baked textures sent along with the fbx? When I open the fbx in the other program what do I do to for example to apply the wood floor texture to the floor or a ceiling beam at a 22 degree angle. Thanks

That is more a question about the fbx exporter and importing into what ever the thing your using is. But generally fbx files don’t have image textures in them, they do usually have the name of the material that an object has.

I can’t really say how you would apply the texture in an unknown other program? Usually they have some option to pick images to use for what ever shading system it has…

There is a place to attach the image file. In the baking process is there a folder where the baked textures can be accessed and attached in the other program/ Thanks

Just discovered your addon today !
That’s a really nice work ! Got a feature idea. Could it be possible to create a High Poly Meshes node directly from the selected objects ?

Yes, that should be fairly straight forward…

I noticed all textures appear to be saved in Linear color space. While that’s fantastic for most textures, game engines expect base color input to be in sRGB. Perhaps adding a color space selector to the image output would be the best solution?

Otherwise, this is fantastic in my first tests!

Feature req: File name template options? So for example Tank_Normal.png and Tank_ORM.png (the latter would RGB mapped to Occlusion/Rough/Metallic for glTF format).

So something like
%O = mesh_object.name
so we could do %O_Normal.png and just use the same node setup for consistency.

1 Like

Yes, there is still a bit of work to be done on the image output stuff. Unfortunately the format settings aren’t easy to manipulate from an add-on (afaik you can’t make your own ImageFormatSettings data blocks). But I intend to provide a lot more control over the output in the next version!

As to additional features, there are a number that people want. But it’s difficult for me to add them without support from donations/sales.

Is the price in Australian dollars or something else on Gumroad? They don’t detail what “A$” means which put me off from buying it(because I didn’t know what the conversion is) the first time I saw it.

Yes it’s AUD. I didn’t mean to use that, but you can’t seem to change it without making a completely new product…

Ive been testing this out a bit. Really awesome so far. I like the idea of having mutliple bake groups all slotted with nodes into a Bake Pass. Really unique and useful.

The one issue I run into pretty consistently is that I get a “bake failed” error for seemingly no reason when I start to dupe or change around the “Output Image Path” node. Usually deleting and remaking seems to work but I’m not sure if there’s anything else going on in the backround.

Really looking forward to watching this develop. I still use Marmoset to bake for production assets but it would be nice to switch over to the Bevel node and this plug-in for non-first person assets.

I’m glad you like it!

If you can save some of the log files when the bake fails I will look into what is causing your issue. (The log location is displayed in the system console, on windows with default settings it will be in the usual ‘AppData/Local/Temp/blenderxxxx/’)

Oh awesome, I’ll try to find it and grab it next time it fails.

Thanks

I really like this - it’s a huge timesaver, but I have one question.

Is it capable of handling Mix Nodes?

I often encapsulate the Principled BSDF node in a Node Group that allows me to redirect any input to an Emission shader, so that I can bake all the different maps (Base Color, Metalness, Roughness, Clearcoat etc.) using Emit baking in Blender. The good thing is that I can use Mix Shader nodes to blend different “submaterials” together and it all gets baked properly.

BakeWrangler gave me a warning that there’s no Principled BSDF node in the end of the Material node tree - (but it’s baking something still, we’ll see how it goes).

Would it be possible to handle the materials using Mix Shader nodes?

Hi unfa, I also used to do a similar thing where my Principled would be in a group. The idea when creating Bake Wrangler was to avoid the need to do that, since I found it annoying to have to keep changing the outputs.

So the current three PBR targets (albedo, metalness, alpha) examine the texture node set up and try to find those inputs on the Principled BSDF. Probably people might want other targets, but those were the main ones I used.

How are you imagining it handles the Mix Shaders? Do you have multiple Principled BSDFs connected to mix shaders? It could probably handle that, I just need a way to determine what values contribute to the map and how they should be mixed.

Can you post an example texture set up?

1 Like

@netherby
Hi ! I know you can’t work full time on your addon (i’m in the same situation, my time is totally consumed by work and school), but a while ago, i tried to bake a model containing curves, and realized it didn’t bake curves.
I took a look into your code to see if i could fix it, (just five minutes ago), and i did it.
I just replaced you value_prop_filter function in your BakeWrangler_Socket_HighPolyMesh class by this:

    def value_prop_filter(self, object):
        return object.type in ['MESH', 'CURVE']

And it works like a charm :wink:

I wish i could help you financially, but it’s a bit hard for me. However i could maybe help you on some features if you wish.
I think this addon should be the way to bake in blender. From all the methods i’ve tried, this is by far the most convenient (though some things could be automated IMO).

Keep it up :smiley:

Edit:
By the way, i ran into a weird issue while baking today.
I modeled a router with Hops and KitOps, but though every parts were to be baked were inside the high poly node and them being all view/render enabled, only 3 of them were taken into account during the bake.

I’m back again.
I think i found the issue with my bake. I seems boolean modifier is not taken into account during the baking process (Modifiers not applied during export ?).

I kept experimenting with the code, and if you are interested i added a Collection node plugable in HighPolys sockets. Also added a property for each Collection input for recursive search of Renderable (mesh or curves not hidden for render to be precise) objects. Search Filter doesn’t show empty collections to make it easier for the user to browse collections.

Hi Darknoodles.

I hadn’t really considered that people might want to bake a curve…

All modifiers that are enabled for rendering get applied before a bake pass is done (there were some problems with modifiers in some cases, so the easiest solution was to just apply them always). Are your booleans enabled for render? They should get applied…

I also planned on having a more verbose debugging mode that could be enabled from options, though there are logs made for every bake which would show any actual errors that get thrown.

If you want to donate code that is fine! :slight_smile: I was planning on having collections select-able, I thought I might just make it part of the high poly meshs node… Do you want to get added to the github project or something so you can submit code?

Yeah, they are render enabled.
I searched a bit more, and it seems to only happen with boolean.
That’s weird, because when i open the passes in the temp folder, the scene looks ok.

Sure ! I can send you the code in PM in the first time if you want, but i’ll be glad to join the Git :smiley:

Hello everyone,
I tried the addon yesterday and I found it quite useful.
Node approach to baking and informative logs help a lot. Hope you’ll find the motivation to continue working on this :slight_smile:
There are a few things I’d like to ask about the addon.
-If I first bake to a 1024x1024 image and then without deleting the file bake a 2048x2048 it ends up with an error. I think it is because addon is trying to add an Alpha channel to a different sized texture. This happened with RGBA targa file. Not a big issue since I can just delete the previous bake file.
-I was testing High to Low mesh. I have multiple high poly meshes. Low poly is just a joined mesh of all high poly meshes with a single UV and one material. It is like baking down multi materials into one material workflow. In High meshes, Albedo textures are set as “SRGB” Color Space. In Bake node Editor, I set the Output Color Space as “SRGB” as well. But after baking if I imported the baked albedo texture and set it to “SRB”, colors don’t match (with high poly materials) but If I set it to “Linear” then the colors match. Is this a bug or am I doing something wrong? Would it be possible to transfer multiple albedo texture to a new UV without effecting its colors?
-What is “Mask” in “Bake Pass” node used for ? I read the tool-tip but still couldn’t understand.

Thanks and have a great week.