Bake Scene
This add-on bakes your scene to textures. This is useful in many situations:
- Creating trim sheets
- Creating decals
- Creating hair cards
- Creating skyboxes
The textures are baked super fast, they are anti-aliased, and they are extremely high quality.
Installation
-
Go to the Releases page and download the most recent
Bake.Scene.zip
file. -
In Blender, go to
Edit -> Preferences...
-
In the
Add-ons
tab, click theInstall...
button. -
Select the
Bake.Scene.zip
file and clickInstall Add-on
. -
Enable the checkbox to the left of
Render: Bake Scene
. -
Save your preferences.
How to use
-
In the
Output
properties, change the resolution.2048
or4096
is most common: -
Change the output folder and image settings to whatever you want, then click the
Bake
button: -
By default it will bake geometry textures (alpha, ambient occlusion, curvature, normal, and height).
But you can change that inside of the
Textures
panel:
Tips and advice
-
The textures created by this add-on can be directly used in DECALmachine.
-
I recommend baking with 100%
Compression
. This slows down the baking, but it means much smaller file sizes. -
The origin point
(0x, 0y, 0z)
is always used as the center for the textures.The
Size
option specifies how big your scene is, anything outside ofSize
won't be baked.By default it bakes a
2m x 2m
box centered on the origin. -
If you want the texture files to have a prefix you can simply add it to the
Output
folder: -
You can have multiple different scenes in the same
.blend
file, and each scene can have different options (output folder, textures, size, etc.) -
It will only bake renderable objects, so if you don't want to bake an object you can disable rendering:
-
If you use a
Principled BSDF
node it will be baked into the textures:These sockets are supported:
Base Color
,Metallic
,Roughness
,Emission
,Alpha
, andNormal
.It works with both simple values and also complex procedural node trees.
-
If you are baking hair, you should set the
Hair Shape Type
setting toStrip
:You should also create your hairs with the highest quality possible. Because they are being baked to a texture, the performance doesn't matter.
Texture Information
-
Alpha
bakes a black-and-white alpha / opacity / transparency texture.This is affected by changing the
Alpha
socket on thePrincipled BSDF
node, and it is also affected by theBlend Mode
settings (Opaque
,Alpha Clip
,Alpha Hashed
, andAlpha Blend
). -
AO
bakes an ambient occlusion texture. White means no occlusion, and black means full occlusion.Ambient occlusion means how close an object is to another object. It is used to add in fake shadows.
-
Curvature
bakes a curvature map. Gray means no curvature, white means curving outwards (convex), and black means curving inwards (concave).This is often used to add extra detail to the edges of models (scratches, scuffs, or dirt).
-
Normal
bakes a normal map. This is affected by theNormal
socket on thePrincipled BSDF
node. -
Height
bakes a height map. Gray means the geometry is at the center0z
, white means positive+z
, and black means negative-z
.This can be used to create parallax effects to add extra depth, or to create bump maps.
By default it calculates the max bounds automatically based on the vertexes in your scene. But you can instead choose
Manual
mode and then manually change the max bounds. -
Color
bakes theBase Color
socket of thePrincipled BSDF
node. -
Emission
bakes theEmission
socket of thePrincipled BSDF
node. -
Metallic
bakes theMetallic
socket of thePrincipled BSDF
node. -
Roughness
bakes theRoughness
socket of thePrincipled BSDF
node. -
Object Random
bakes a black-and-white texture where every object is given a random grayscale color.This can be used for post-processing to mask out specific objects.
-
Object Index
bakes a black-and-white texture which is based on the object'sPass Index
:This can be used to mask out specific objects, or groups of objects.
You must change the
Max
option to be the same as the biggestPass Index
that you are using. -
Material Index
bakes a black-and-white texture which is based on the material'sPass Index
:This can be used to mask out specific materials, or groups of materials. This is particularly useful for DECALmachine's
Subset
map.You must change the
Max
option to be the same as the biggestPass Index
that you are using. -
Hair Random
bakes a black-and-white texture where every particle hair strand is given a random grayscale color. -
Hair Root
bakes a black-and-white texture where black means the root of the hair, and white means the tip of the hair.
For programmers
If you want to modify this add-on, follow these steps:
-
git clone https://github.com/Pauan/blender-bake-scene.git
-
cd blender-bake-scene
-
blender --background --python install.py
This will install the add-on locally.
-
Now you can open Blender normally and the add-on will be installed.
-
When you make changes to the code, close Blender and then run
blender --background --python install.py
again.