Bulk Bake

by VeesCreations in Addons


Bulk bake is a tool designed to speed up and simplify the baking process in blender.

Overview

Often in 3d design, it is important to 'bake' data from textures applied to the model into images mapped to the models surface using UV maps either to simplify model shaders where multiple shaders may be used, or for easy import/export into other blender scenes or other programs.. This system of baking out shaders to a set of images which describe the shader is essential for game development for instance, as it allows the game engine to 'understand' the shader and how light should respond to it so ultimately how it should look. One of the most common 'sets of images' are known as metallic PBR materials. These images consist of a base colour (also referred to as 'albedo' or 'diffuse'), a roughness map (how reflective the surface is), a metallic map (the 'tint' of the reflected surface with respect to the base colour) and a normal map (the direction light should be reflected in).

Blender has a built in baking section for cycles where you can bake out certain properties of your shader to images.

The problem

Blenders built in bake options are not only limited, forcing you to manually alter materials to export for the PBR metallic materials, but also only allow the option of baking one map at a time. This is slow and tedious, especially in situations where you may have to so this repeatedly. It's also very easy to miss something in the setup and have to re-bake, which can take a fair amount of time. 

That's what bulk bake aims to simplify.


What does Bulk bake do?

It condenses all of the setup and baking into a one button operation. It operates like the blender built in bake but with some extras too.

It can:

    • Export base, roughness, metallic, normal and emission maps at a desired img size
    • Automatically save the images (blenders internal bake requires you to manually save each image, failure to do so can frustratingly delete the image!)
    • Optionally apply the newly baked images to the model (really helpful for game dev, as most engines can grab the textures referenced on import without having to manually search for them in-engine)
    • Optionally export the model as an fbx at the same time
    • Export true linear colour unlike the blender 'diffuse' bake, which alters the image colour-space no matter what. (No more slightly off colours/normals when importing to a game engine!)

    And it does it without any hassle. 


    Usage

    Bulk bake functions very similarly to the built in blender bake. The bulk bake menu is located in the 'Properties panel' (default shortcut is 'n') in both the 3d view and image viewer. Please make sure the blender file is saved to avoid issues with image save location!

    For individual objects where you want to bake the materials off the object into textures:

    1. Simply select the object (double check the 'Target' in the bulk bake menu is the desired object)
    2. Ensure you've UV unwrapped the object and has at least one material applied
    3. Select an output folder (default is the location of the blender file)
    4. If you want the baked images to be applied as a new material, check the "Apply images as material" box
    5. Enter an image size as an integer. eg: 1024 (Note, this will be square. Recommend using power of 2 sizes, eg '512' or '1024' or '2048' etc)
    6. Choose the bake type you need from the panel of check-boxes below the bake button
    7. Hit the bake button and wait!

    For multiple objects where you want to bake several models onto a singular mesh:

    1. If a cage[1] is required, create a cage object that covers the objects to bake (our source object(s)). For simple models, usually duplicating the destination object, entering edit mode, selecting all and using the shrink/fatten (shortcut Alt+S) to expand the faces until all the objects are covered is sufficient. 
    2. Select all of the objects you want to bake, then using Ctrl+Click select the destination object last. The target should show the destination object name.
    3. Ensure the destination object is UV unwrapped
    4. Check the "Use cage (S2A)" checkbox to enable Selected To Active (S2A) mode (And the "use cage" option if a cage is being used).
    5. If a cage is used: Use the eyedropper or dropdown menu on the "Cage Obj" field to select your cage object
    6. Continue with steps 3 onwards from the single object steps above

    Bake times will depend on hardware and image size+bake types.

    Please note, the blender window on Windows will show as "not responding" whilst baking, this is due to how Windows determines if a program has stopped responding and is expected behaviour, please don't panic!


    Installation

    To install, simply download the zip file, open up blender and head to edit->preferences via the toolbar at the top, then select the "Add-ons" page. Click the "Install" button to the top right of the window and use the file-browser to locate the zip file. The addon should show up in the addons list on its own, but in the event that it doesn't, ensure the "enabled addons only" checkbox in the top left of the addon window is unchecked, then try searching for "BulkBake" with the search bar to the right. Click the small checkbox next to the drop-down arrow to the left of the addon row to enable the add-on. 

    You can now close the preferences window and access the Bulk Bake menu through the 'Properties Panel' in blender (shortcut is 'n') in the 3d viewport or image viewer.



    Bulk bake was created because as a game dev, I found myself spending so long setting up bakes natively in blender that  I decided it'd be a huge benefit to create a custom plugin to do everything I needed from it. As such, this software has the things I need, but maybe not some things that it and the wider community could benefit from, so if you feel something is desperately needed or if you have any issues at all, please reach out! 

    If you decide to grab a copy of bulk bake, thank you so much for supporting me. Bulk bake, even though its pretty simple, did take a lot of time to make so hopefully the cost doesn't seem too unreasonable!


    Bugs/limitations
    • materials start to be edited even if the bake will fail due to either incorrect setup/UV mapping etc
    • Error in the report message when a material isn't present on a selected object, due to type error when returning material name.
    • No options for the fbx export (again, hope to add these in an upcoming update)
    • Blender will crash if selected bake target is not visible. Adding check for this in next update.


    Changelog

    0.2.9:

    • Added "Use cage" option so that S2A mode doesn't imply cage use
    • Fixed reliance on native s2a and cage options causing issues when enabled in cycles bake options and using BB to bake a single object
    • Only target object will be exported now, not all selected when exporting from s2a mode

    [1] A cage object is a way of 'mapping' the faces of, typically, a higher poly source to a lower poly destination. Imagine using the faces of the cage as cameras looking at the source mesh. This allows us to capture an area from our source mesh and map it to the faces of our destination without having the destination necessarily match the location of the source. This is useful for high to low poly as a low poly mesh will lose some shape, so might be smaller or bigger than the high poly mesh in areas. As such, the cage object MUST match the face count of the destination mesh, and must cover the source object(s). Usually simply duplicating and inflating the destination mesh is enough, but sometimes tweaks are needed to make sure all details are properly transferred, most notably this is visible around steps in the mesh. As this is a blender native function, there are many resources on creating a cage if more info is needed.

    Published 7 months ago
    Blender Version 3.4
    License GPL
    Have questions before purchasing?

    Contact the Creator with your questions right now.

    Login to Message