Skip to content
ImagineWorld

Introduction to the Simulation Zone

node_idnode-book_procedural-3d-modeling-using-geometry-nodes-in-blender_chapter-15-introduction-to-the-simulation-zone
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num15
chapter_titleIntroduction to the Simulation Zone
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 15 — Introduction to the Simulation Zone

Section titled “Chapter 15 — Introduction to the Simulation Zone”

In the previous chapter, we helped you troubleshoot the most common problems you might experience in the Geometry Node editor.

In this new part, we will introduce you to a whole new system in Geometry Nodes, called Simulation Zone, which allow us to loop certain nodes in the Geometry Node editor, allowing us to create various effects from simple animations to full physics simulations.

We will start off this chapter by explaining how the Simulation Zone works, we will explain what nodes are relevant, and we will end this chapter with a simple exercise on Simulation Zone.

We will look at the following topics in this chapter:

  • What is a Simulation Zone?
  • Understanding the flow of the Simulation Zone
  • Rotating a cube using the Simulation Zone
  • Experimenting with curves in the Simulation Zone
  • Exercise – creating a Cell Fracture with the Simulation Zone

Some figures in this chapter show the full Blender setup, including node trees, outcomes, and parameter settings. For easier viewing and readability, these figures are also available in the book’s GitHub repository.

You can find the exercise and demos from this chapter in the common .blend file in the book’s GitHub repository.

Added in Blender 4.0 back in November 2023, a Simulation Zone is a new way of performing complex mathematical simulations in Geometry Nodes. A Simulation Zone consists of two nodes that form a zone in which nodes are repeated each frame.

Figure 15.1: Simulation Zone

Just like any other node previously discussed, this set of two nodes can be dropped in between your node tree normally.

Important note

To simplify the explanations in this chapter, we will be referring to the Simulation Begin node and the Simulation End node, which represent the beginning and end nodes of this zone.

As you can see in Figure 15.1, the zone is defined by a purple outline. This purple zone will expand as we add nodes in our Simulation Zone, as you can see in Figure 15.2:

Figure 15.2: Example use of Simulation Zone

This specific node tree is an example of a particle emitter, where we use a plane to repeatedly add points onto a mesh and make them fall down using a Transform Geometry node.

Let’s have a look at what all these nodes mean.

Understanding the flow of the Simulation Zone

Section titled “Understanding the flow of the Simulation Zone”

The Simulation Zone can be seen as a loop inside of our Geometry Nodes project. As you can see in Figure 15.3, these are the most important elements of the Simulation Zone:

Figure 15.3: The Simulation Zone explained

Let’s quickly go over the elements mentioned in Figure 15.3:

  1. This is the main part of your Simulation Zone. This line will invisibly loop everything you put in the Simulation Zone and will repeat each passing frame.
  2. This is your Delta Time. This will indicate how long it takes for each frame to pass. This is important if you still want your simulation to work correctly even when using a different frame rate.
  3. This is the Skip Boolean. This allows you to temporarily pause your loop until the Boolean is false.
  4. This is the Simulation Input. This will be the value your loop line gets on the first run.
  5. This is the Simulation Output. This is the end of your zone and outputs the loop as it’s happening.

We can always add more lines to this loop when we want to make more complex projects, which we will see in the coming chapters.

It’s important to mention that the Simulation Zone works via a cache. When you add in a Simulation Zone and start playing around with your project timeline, you’ll see a purple bar appear, as you can see in Figure 15.4:

Figure 15.4: Cached Simulation Zone data

This represents where your Simulation Zone has been calculated – in other words, the Simulation Zone cache.

If you change your node tree after loading the cache, it’s important to go back to the first frame by executing Shift + Left Arrow. This will make sure the cache gets cleared and your new node tree will be loaded. It’s best to do this after every change you make; otherwise, the changes might not be entirely visible.

Now that we know the basics of how the Simulation Zone works, let’s dive right into a simple demo.

The easiest way to learn about the Simulation Zone is by doing. In this demo, you’ll learn how to move a cube each frame using the Simulation Zone.

Let’s get right into it by opening Blender and adding a new Geometry Node tree to the default cube.

When pressing Shift + A to add a new node, you will see an entry called Simulation appear in the list of nodes, as seen in Figure 15.5:

Figure 15.5: Simulation Zone in the Add menu

When clicking this entry, you’ll see the Simulation Zone appear in your Geometry Nodes project. It will not do anything yet, because it is not yet connected to the output. Let’s connect the Simulation End node to Group Output to visualize what is happening. We see that our cube disappears. This is because we still want to keep Group Input.

Let’s connect it to the Simulation Begin node. Now we see the cube appears again. We can see that, yet again, nothing happens. This is because there’s nothing in our Simulation Zone yet.

To complete this demo, let’s drop in a Transform Geometry node between the Simulation Begin node and the Simulation End node. Let’s give this Transform Geometry node a Rotation value of 5° on both the X and the Y axis.

If you have executed these steps correctly, this is what your current project should look like:

Figure 15.6: Your current project

We can see that when we hit the play button on our timeline, the cube starts to rotate as an animation!

If we take a closer look at our node tree, we can see that the Transform Geometry node gets repeated each frame, as shown in Figure 15.3.

Using various techniques involving mathematics and named attributes, we can create complex simulations, as we will see in the coming chapters.

Experimenting with curves in the Simulation Zone

Section titled “Experimenting with curves in the Simulation Zone”

Let’s see what else we can do with this Simulation Zone. Go ahead and remove the Transform Geometry node so we have a clean Simulation Zone again. Let’s also replace the Group Input node with a Curve Line node.

Let’s make it so that the curved line gets more and more distorted with each passing frame. To do that, let’s add a Set Position node in our Simulation Zone.

Let’s also add a Noise Texture node and plug the Color output into the Offset input of the Set Position node.

Let’s give the Noise Texture node the following parameters, which will work great for this exercise. These values are an artistic choice, so feel free to play around with different values.

Figure 15.7: Noise Texture parameters

When you hit play, you’ll see that the Curve Line disappears into the corners. This is because our Noise Texture node isn’t balanced yet. To do this, let’s add a Vector Math node set to Subtract. Give it a value of 0.5, as we’ve done in previous chapters, and let’s add it between the Noise Texture node and the Set Position node.

Now, our Curve Line stays in the middle; however, it’s not doing much.

This is because it’s only working with two points. To fix this, we can drop in a Resample Curve node at the beginning of our Simulation Zone to keep resampling the curve each frame. Let’s set this Resample Curve node to Length and keep the value of 0.1.

Important note

Keep in mind that, for each change, you have to go back to the first frame of your timeline by executing Shift + Left Arrow. Otherwise, changes might not be visible.

If you have followed these steps correctly, this is what your node tree should look like:

Figure 15.8: Your current node tree

We can see that the Curve Line now distorts infinitely. Keep in mind not to let it run for too long, or it will consume your computer’s resources until Blender crashes.

If we take a look at what’s happening, we can see that our Set Position node is being looped over and over again, creating the distortion effect we see onscreen. Each frame, the curve also gets more geometry to distort, thanks to the Resample Curve node, which also gets looped.

Feel free to play around with the Noise Texture node to create some cool effects!

Now that you have a basic understanding of how the Simulation Zone works, let’s take a look at a practical exercise for the Simulation Zone in Geometry Nodes, where you will be making a Cell Fracture with the Simulation Zone.

Exercise – creating a Cell Fracture with the Simulation Zone

Section titled “Exercise – creating a Cell Fracture with the Simulation Zone”

Congratulations on making it this far! In this exercise, we’ll cover how to create a Cell Fracture effect with the use of Geometry Nodes and the Simulation Zone, as seen in Figure 15.9:

Figure 15.9: The exercise’s final result

Let’s get right into explaining how we are planning on achieving this effect.

To create this effect, we will need a cube that randomly scatters over our object and performs Boolean operations in a loop. This will cut out parts of the object that we can use as a Cell Fracture.

To do this, we’ll first have to define a cube that randomly scatters, which we will create using various Random Value nodes and Instance nodes. Let’s get right into doing that.

Let’s start off this journey by adding a new cube to our Viewport and adding a new node tree to this cube.

Let’s delete the Group Input node, as we will not be needing it yet, and replace it with a Cube node. This Cube node will be our cutting object, but for that purpose, we will need it to randomly move throughout our scene.

To do that, let’s add four nodes in the following order after the Cube node:

  1. Geometry to Instance node: This node is responsible for converting our Cube node to an instance, meaning we have more flexibility over the movement of this cube.
  2. Rotate Instances node: This node will be responsible for the rotation of our cube.
  3. Scale Instances node: This node will be responsible for the scaling of our cube.
  4. Translate Instances node: This node will be responsible for the translation of our cube. It’s important that we place this node at the end, otherwise our rotation will be off-center.

Now that we have added all these nodes to our node tree, it’s time to give these nodes some randomization.

Let’s add a Random Value node set to Vector on each of the Instance nodes and give them the following values according to this table:

Rotate InstancesScale InstancesTranslate Instances
Min0 on all axes0 on all axes0 on all axes
Max6.28 on all axes1 on all axes1 on all axes

Table 15.1: Table of values for added Random Value nodes

Lastly, we want to make sure that each frame, the randomization changes. We can do that by modifying the Seed value of each of these Random Value nodes. To do this, let’s add in a Scene Time node and connect the Frame output to each of the Seed inputs on the Random Value node.

If you have followed these steps correctly, this should be what your project currently looks like:

Figure 15.10: Your current node tree

If we now hit play, we can see that our cube randomly jumps throughout our scene.

To clean up our node tree a bit, let’s select all our nodes and press Ctrl + G to make a group.

Let’s press Tab to exit this group, and we can call the group Random Cube by selecting the node and pressing F2 as seen in Figure 15.12:

Figure 15.11: Random Cube node group

Now it’s time to start creating our simulation. Let’s add in a Simulation Zone and connect the Simulation End node to the Group Output node.

Let’s also add the Group Input node again and connect it to the Simulation Begin node.

In the Simulation Zone, add a Mesh Boolean node and connect it to both ends. This node will be responsible for cutting away parts of our cube.

On the Mesh Boolean node, we can see two inputs, the Mesh 1 input and the Mesh 2 input. Let’s drag the output of the Random Cube node group to Mesh 2.

When you go to the first frame and hit play, you’ll notice that parts of the mesh start disappearing each frame.

This is a good start, but it’s not what we want as our final result. We want to receive the parts it cuts out.

To do that, let’s add another Mesh Boolean node set to Intersect, and connect it the same way as the previous Mesh Boolean node.

It’s not connected to any output yet. That’s because we want to create a new geometry line in our loop. To do that, let’s drag the output of the Mesh Boolean node to the unoccupied gray node connection of the Simulation End node.

Figure 15.12: Unoccupied gray node connection

We can see that not much has changed. That’s because this is not being output in any capacity to the Group Output node.

We can see that the Simulation End node now has two outputs. The first one is the Difference boolean, and the second one is the Intersect boolean, which is the one we want. Let’s connect the second output to the Group Output node.

If you have followed the previous steps correctly, this is how your node tree should look:

Figure 15.13: Your current node tree

We can see that, now, it flashes the cut objects on the screen. Instead, we want them to stay on the screen. We will need to tell Blender that it has to retain the previous cuts in this line as well. To do that, we’ll add a Join Geometry node after the Intersect Mesh Boolean node.

We will need to take the looped line and feed it back into the Join Geometry node, so that it retains all the previous loops.

To do that, we’ll connect the second Geometry output of the Simulation Begin node to the Join Geometry node as well, so that both the Intersect Mesh Boolean node and the looped line are added together.

You will now see that the cuts appear together, which is exactly what we wanted to achieve to create our final Cell Fracture effect.

If you have followed the previous steps correctly, this will be your final node tree:

Figure 15.14: Your final node tree

To improve your understanding of this node tree, here’s a graphic of what exactly the Simulation Zone does behind the scenes:

Figure 15.15: Node tree explained

That brings us to the end of this chapter!

This chapter introduced the Simulation Zone, enabling frame-based geometry loops within the Simulation Zone. Key concepts such as delta time, caching, and pausing the loop were explained. Examples included animating a rotating cube and distorting a curve with noise. The chapter concluded with a Cell Fracture exercise, using a random cube and Boolean operations to create procedural fractures.

In the next chapter, we will take a look at how we can use the Simulation Zone to modify points, along with some fun and creative effects we can use it for.