Skip to content
ImagineWorld

Baking in the Geometry Node Editor

node_idnode-book_procedural-3d-modeling-using-geometry-nodes-in-blender_chapter-18-baking-in-the-geometry-node-editor
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num18
chapter_titleBaking in the Geometry Node Editor
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 18 — Baking in the Geometry Node Editor

Section titled “Chapter 18 — Baking in the Geometry Node Editor”

In the previous chapter, we learned how to utilize mathematics to create a procedural fountain created from points. In this chapter, we’ll learn how to bake parts of node trees and simulations using the Bake node in the Geometry Node editor.

While creating dynamic procedural systems is powerful, it can be computationally demanding. Baking is the essential next step in the workflow, allowing you to “lock in” your results for vastly improved performance. This skill is crucial for finalizing simulations or preparing complex assets for animation and rendering.

In this chapter, we’ll cover the following main topics:

  • What is baking?
  • The Bake node
  • Baking in your node tree
  • Troubleshooting with baking
  • Exercise – baking a simulation

The overall goal of this chapter is to teach you how to use the Bake node to freeze the results of complex Geometry Nodes setups and simulations. This is a crucial skill for optimizing performance, ensuring consistent results, and preparing your projects for final rendering or distribution.

Let’s start this chapter off by explaining what exactly baking is.

Be sure to have at least 5 GB of storage free on the disk drive where your .blend file is located. This is crucial for saving large bake files.

In everyday language, baking refers to the action of cooking food by hot air.

In Blender, that’s not the case. Baking in Blender refers to the solidifying of information in a simulation to be kept and used at a later time. This can be lighting, materials, simulations, and so on.

In this chapter, we’re going to look at how to bake our node trees in the Geometry Node editor. But first, let us understand why baking is a useful step in the Geometry Nodes workflow.

Baking in Blender has several practical benefits, especially when working on complex node trees or scenes.

In the case of Geometry Nodes, baking is important to keep your node tree running as smoothly as possible. Any parts of your node tree that will not change can be baked, and the information will not be recalculated over and over again.

This speeds up your Geometry Nodes workflow, allowing you to work smoothly.

Baking also allows your simulations to be consistent. This is because we are solidifying information that will not change unless we tell it to.

Let’s take a look inside Blender and see how we can spot a bake.

Explaining baking by looking at the Timeline

Section titled “Explaining baking by looking at the Timeline”

You might have noticed that, when we are using the Simulation Zone (for details, see Chapters 15, 16, and 17), a new color (purple) appears on our Timeline, as seen in Figure 18.1:

Figure 18.1: Caching in the Timeline

This line refers to the cache that is being saved for the Simulation Zone. For example, if this line appears striped, it means your cache is outdated and you should restart your Timeline by executing Shift + Left Arrow. A cache can become outdated every time you change something in your node tree.

Baking can be compared to this caching method, with the difference that caching will retain your information until you delete it.

Caching also gives our Timeline a new color, as seen in Figure 18.2:

Figure 18.2: Baking in the Timeline

It might not be very noticeable, but there are two lines now, one referring to the status of your cache and another referring to the status of your bake, which is thicker and in purple.

We can also change the path of where this information will be stored, which is what we’ll look at in the next section.

By default, our bake will be saved to the location where our .blend file is saved, in a map called blendcache.

Of course, we can change this. If we navigate to our modifier stack and open the Manage | Bake options, we can see that we are presented with the following settings:

Figure 18.3: Bake Path

When we click on the folder icon, we can specify where Blender should save our bake information. This is handy because some bakes can become very large, as we’ll see in the exercise at the end of this chapter.

Now that we’ve covered the theoretical aspects of baking and how to manage the resulting files, it’s time to introduce the star of the show. The entire baking process within the Geometry Node editor is controlled by a single, dedicated node: the Bake node.

It’s time to get practical; let’s start by introducing ourselves to the Bake node inside the Geometry Node editor.

Figure 18.4: The Bake node

As you can see in Figure 18.4, this is the Bake node. This will ensure any data inputted before this node will be saved to a cache. The node then outputs this stored information for the rest of the node tree to use in further processing.

The Bake node consists of three main parts, as annotated in Figure 18.5:

Figure 18.5: The different parts of the Bake node

Let’s understand the different parts of the Bake node in greater detail:

  1. Mode selection buttons: These are the mode selection buttons. As you can see, there are two options: Animation and Still:
    • Animation will ensure that the entire Timeline range will be baked. By default, this is 0-250 frames. This will be our main option when working with Simulation Zones. Otherwise, our simulations will not work.
      • Still will ensure that only one frame will be baked. This is handy when not working with the Simulation Zone.
  2. The Bake button: This button is the main button of the Bake node, which allows you to either initiate a bake or delete a bake.

If this button is grayed out for you, it’s possible that you still have to save your file before you can start baking.

  1. The inputs and outputs: This is where we input our data that should be baked.

At first glance, it might appear that we can only input and output Geometry data, but that’s not true. Thanks to the gray node connection, we can input any data type into the node connection. This allows us to bake data such as values, strings, and extra geometry lines.

The Bake node outputs the baked information without recalculating the whole part before the node tree. Anything that has been input into the Bake node will not be recalculated.

Time to actually start baking now! We’ll start by opening a new project, adding a cube, and heading to our Geometry Nodes workspace. Let’s also add a new node tree to this cube.

We’ll start by showing how we can utilize the Bake node to simplify parts of our node tree so our computer does not have to recompute our node tree each time:

  1. Add a Simulation Zone in between the Group Input and Group Output nodes. In this Simulation Zone, add a Transform Geometry node that will rotate our cube by 1 degree each frame.
  2. Turn on the Timings option so we can visualize how long nodes are processing for, thus visualizing the amount of time we save when baking. This option can be seen in Figure 18.6:

Figure 18.6: Timings option

As seen in Chapter 14, this option allows us to see how long the nodes take to process each action.

  1. When we take a look at our node tree, we can see that our nodes are processed as usual.

Figure 18.7: Node tree without baking

  1. Let’s add another node after this Simulation Zone; for example, let’s take an Extrude Mesh node and drop it after our Simulation Zone.

We can see that both the Transform Geometry node and the Extrude Mesh node are being executed, thanks to the Timings visualization.

Suppose we don’t want to change the rotation part of our node tree anymore, and we want to save on performance – let’s bake that action but keep the other actions unbaked. Follow these steps:

  1. Drop in a Bake node between our Simulation Zone End node and our Extrude Mesh node.
  2. Set your Bake mode to Animation and hit Bake. If the button is grayed out for you, you might have to save your project.
  3. When we replay our Timeline, we can see that the nodes before our Bake node are now no longer being processed – they are now baked.

Now, imagine we want to change the speed of our baked action. How do we do that? Luckily, that’s very easy. The following steps explain the process:

  1. Click the trash can icon next to our Bake button to delete our bake.
  2. Change the value of the Transform node’s rotation from 1 to 10.
  3. Press the Bake button again.

We can see that our Transform Geometry node is still not being processed, but our Extrude Mesh node is, just like it was before.

Let’s say we want to include the Extrude Mesh action in our bake as well. This can be done in the following way:

  1. Move your Bake node to the end of our node tree. You will see that our extrusion disappears. This is because our bake data is still the data from the previous position of the node.
  2. To fix this, let’s delete the bake and press Bake again.

When your bake is finished, you will see that none of the nodes are being processed anymore, since they are all baked now.

However, baking does not always go according to plan. In the next section, let’s look at some beginner mistakes that might occur when baking parts of your node tree.

Let’s quickly go over some issues you might face when using the Bake node in the Geometry Node editor:

  • My Bake button is grayed out.

We have briefly covered this previously, but it’s crucial to save your project file before you can start baking in Blender. This is because baking requires files to be saved on your hard drive. Without saving, Blender will not know where to save these bakes.

You can also tell Blender where to save the bakes by heading to your Modifier stack and entering a bake path, but you will still have to save your project file before the baking option becomes available.

  • My node tree does not update after making changes.

It’s necessary to rebake your node tree after each change is made in a region that ends with a Bake node; otherwise, your bake data will become outdated. You can fix this by either rebaking your data by pressing the Bake button again or temporarily removing your Bake node while you are making changes, then rebaking that part of your node tree.

  • My bake node is not saving any data from a sole value input.

It’s important to keep in mind that datatypes not accompanied by a Geometry datatype will not be stored. Make sure that the Geometry input at the top of the Bake node is occupied. After that, other data types can be stored in the Bake node.

If you have any other issues, consider rechecking your node tree for any errors or issues with your Bake nodes.

In the next section, we’ll put our newfound baking skills to the test, where we will bake an exercise from Chapter 17, which is our procedural fountain animation.

Let’s start this exercise by opening our Chapter 17 project file, where we made a procedural fountain animation complete with gravity properties.

We could choose to bake certain parts of our simulations. For example, we could bake just our point generation. This strategy is useful if you are satisfied with an early, computationally heavy part of the node tree (such as the point source) but still want to experiment with the subsequent simulation, as it improves performance by locking in the finished calculations. We can also place our Bake node at each different step we take in the calculation process.

In this case, we’re already happy with our animation, which means we will bake the entire node tree, which will be the usual strategy when baking something. Follow these steps:

  1. Place a Bake node at the end of our node tree. Set the Bake mode to Animation, as shown in Figure 18.8:

Figure 18.8: Bake node at the end of our node tree

Optionally, we can also set a path of baking in our Bake Path option in the Modifier stack.

  1. Once you are ready, go ahead and press the Bake button and let your computer perform the necessary calculations for your entire Timeline range.

Depending on how many points you add, this might take a really long time or finish instantly.

  1. When your bake finishes, you’ll see that our Timeline range appears above the Bake node, as seen in Figure 18.9:

Figure 18.9: Finished Bake node

For a frame range of 1 - 250 with a density value of 30.000, we can go to the file path of our bake and check how much data our bake contains.

In our case, our bake contains about 92.8 MB of data:

Figure 18.10: Size of our bake

At this point, the simulation is fully baked.

The interesting part about baking our data is that we can now distribute this simulation without issues.

This can be very handy in scenarios where you want someone else to render your animation, such as render farms, which will not render frames in a chronological order. This would cause issues if we didn’t bake our simulation.

Now that this Bake node is in between our node tree, we can distribute this project without the end user needing to recompute our simulation.

With that, we come to the end of this chapter! Let’s quickly go over the facts we have learned in this chapter in the Summary section.

In this chapter, the process of baking in the Geometry Node editor was explored.

Baking was explained as solidifying simulation data to improve performance and consistency. The benefits of baking were highlighted, such as speeding up workflows by preventing unnecessary recalculations.

We were also introduced to the Bake node, along with its features, including mode selection, bake buttons, and input/output functionality.

A practical example demonstrated how to bake parts of a node tree to optimize performance while maintaining flexibility to rebake when needed. Troubleshooting tips were provided to address common issues, such as ensuring project files are saved and rebaking outdated data.

In the exercise, we attempted to bake one of our previous exercises from Chapter 16, where we baked a large number of points forming a galaxy.

In the next chapter, we’ll learn how to simulate bugs crawling on objects.