Manipulating Mesh Using Geometry Nodes
local graph
Chapter 9 — Manipulating Mesh Using Geometry Nodes
Section titled “Chapter 9 — Manipulating Mesh Using Geometry Nodes”In the previous chapter, we showed you how to edit and manipulate Curves in the Geometry Node editor. This will benefit your workflow when you want to align or modify mesh using a Curve. To take you further, in this chapter, we will teach you how to manipulate mesh using the Geometry Node editor. This will help you create all sorts of shapes, from landscapes to building types. To aid you in achieving that goal (of manipulating mesh), we will cover how to extrude mesh, how to use Booleans, and how to modify your mesh using the Set Position node. At the end, we’ll combine these skills into an exercise.
In this chapter, we will cover the following subjects:
- Extruding your mesh
- Using Booleans on your mesh
- Adding noise to your mesh
- Exercise – making a procedural pyramid generator
First, let’s see how to extrude a mesh.
Technical requirements
Section titled “Technical requirements”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 GitHub repository.
Extruding your mesh
Section titled “Extruding your mesh”Extruding mesh is a very handy function in Blender. It can help you create extra faces in your mesh. It allows you to pull faces, edges, or vertices out of the original mesh. An example of extrusion can be seen in Figure 9.1.

Figure 9.1: An example of extrusion
The node that we will use to achieve this effect is the Extrude Mesh node, which can be seen in the following figure:

Figure 9.2: The Extrude Mesh node
Let’s start off this chapter by giving you a demonstration of this node.
Demonstrating the Extrude Mesh node
Section titled “Demonstrating the Extrude Mesh node”We will begin by adding an Icosphere to your Blender project and then adding a new node tree to this Icosphere.
Luckily, the Extrude Mesh node is quite easy to use. All we need to do is to drop the Extrude Mesh node between the Group Input node and the Group Output node. As you do this, you will see that our Extrude Mesh node works as intended!

Figure 9.3: Extrusion in the Geometry Node editor
Using the Offset Scale input of our Extrude Mesh node, we can decide how much each face should be extruded. We can also choose whether the faces should be individually extruded or whether the extruded mesh should be connected to each other. You can see the difference between these two options in the following figure:

Figure 9.4: Not individual versus individual
As you can see in Figure 9.4, this option will add additional faces between the gaps of the extrusion poles.
As we’ve seen throughout the past chapters, we can use the Random Value node to randomize different aspects of our geometry in the Geometry Node editor. This can also be done with the Extrude Mesh node.
To do this, let’s add in a Random Value node and connect the output to the Offset Scale input of the Extrude Mesh node. As you can see, you get the following result:

Figure 9.5: Random extrusion

As you can see in Figure 9.5, the extrusion poles have been randomized and now vary in length. We can set the length by editing the Random Value node’s parameters to anything we like.
As you might have noticed, the Extrude Mesh node has various modes of extrusion, and we have the option to extrude faces, edges, and vertices. You can see what each option does in the following screenshot:

Figure 9.6: Extrusion modes
As you can see in Figure 9.6, the first option, Faces, will extrude the faces of your mesh, which you’ll use the most. The second option, Edges, will extrude the edges of your mesh, which can be useful to create walls on a plane. The last option, Vertices, will only extrude each vertex separately. You won’t see this effect rendered unless you use additional nodes to visualize it.
Using Booleans on your mesh
Section titled “Using Booleans on your mesh”In this section, we will show you in-depth how to use Booleans in the Geometry Node editor.
You might have worked with Boolean Modifier before in Blender. This modifier performs operations on meshes such as cutting, combining, or intersecting two meshes.
The Boolean system in the Geometry Node editor works in much the same way. In the following figure, you’ll see the node that we will be using to perform these actions:

Figure 9.7: The Mesh Boolean node
We have already seen a possible use case of this node in Chapter 7, where we made a Procedural 3D Ambigram. Now, it’s time to look at what else this node can do!
As you can see at the top of the node, we see the mode selection of this node. Let’s go over each mode that this node presents:
- Intersect: As the title of this mode suggests, this mode will detect the intersection of multiple (two or more) meshes. If a mesh is present at a given point on every input, the mesh will be generated on the output. This is also the mode we used for the procedural 3D ambigram. Figure 9.8 is an example of an intersection by the Mesh Boolean node:

Figure 9.8: Example of an intersection
The red lines on the figure are there to show you where the two cubes are and are not visible in your Blender projects. They are here for illustrative purposes.
- Union: This mode combines various meshes into one big mesh. You might think: wait, doesn’t the Join Geometry node do that already?
The answer is no. The Join Geometry node joins the multiple objects together into one geometry, but the meshes will still be separate. On the other hand, the Union mode performs calculations to make sure that the mesh is welded to the other mesh. In the following wireframe screenshot, you can see the difference between these two functions:

Figure 9.9 Union versus Join Geometry
- Difference: The last mode that we will be covering is the Difference mode. This is probably the most classical use of a Boolean function. You can use this mode to cut away parts of your base mesh by utilizing objects as your Boolean object.
As you can see in Figure 9.7, we have two mesh inputs. The first input is called Mesh 1. This is where your base mesh should be inputted. The second input is Mesh 2. This is where your cutting object should be inputted.
Let’s demonstrate the Difference mode, the classic mode, using the following demonstration.
Demonstrating the Difference mode
Section titled “Demonstrating the Difference mode”Let’s begin our demonstration with the following steps:
- Start by adding two Cube nodes into your Geometry Node editor. We will give them both a size of
1by1by1meter. - The second Cube node should be followed by a Transform node to move the cube
0.4meters on the X and Z axes. This is how your node tree should look:
Figure 9.10: Your current node tree
- Once you’ve done that, it’s time to make use of the Mesh Boolean node. Let’s plug the top Cube node into Mesh 1 and the Transform node into Mesh 2.
In other words, we’re taking the first Cube node and we’re cutting it away with a second Cube node that we’ve moved 0.4 meters on the X and Z axes.
This is how your current node tree should look:

Figure 9.11: Your current node tree
If you look at your Viewport now, you can see that it worked. We see Mesh 1 with Mesh 2 cut away. The red lines on the figure are for illustrative purposes and are not visible in Blender; these represent Mesh 2.

Figure 9.12: Difference Boolean example
Now we know how to use the Mesh Boolean node in the Geometry Node editor. Next, let’s learn how to add noise to your mesh, as we learned in Chapter 8.
Adding noise to your mesh
Section titled “Adding noise to your mesh”Let’s begin our journey into adding noise to a mesh.
We will add a plane (Grid), and we’ll use a Set Position node to add displacement to our mesh using Noise Texture, just like we executed in the previous chapter. The difference now is that we’ll be performing it on a mesh instead of a Curve.
Demonstrating how to add noise to your mesh
Section titled “Demonstrating how to add noise to your mesh”Doing this is straightforward, let’s start by following these steps:
- Add a Grid node and give it enough resolution. Let’s give it a resolution of
50vertices on both the X and Y axes. - After the Grid node, let’s add a Set Position node to start modifying the grid.
- Before we start adding a Noise Texture node to the Offset input, we need to be able to convert the Offset input value to its separate X, Y, and Z values. This can be done using a Combine XYZ node.
This is how your current node tree should look:

Figure 9.13: Your current node tree
- Now, it’s time to start modifying our grid. Let’s add in any Texture node of your choice. In this demonstration, we will be using a Noise Texture node.
Let’s add a Noise Texture node and connect the Fac (factor) output to the Z input of the Combine XYZ node. This will make sure that our offset happens on the Z -axis. If you want the displacement to happen on the X or Y -axis, you can connect it to the needed axis.
Once you connect the node, you can see that our grid starts to deform:

Figure 9.14: Your current node tree
- As you might be able to see, our mesh is not on the ground anymore, and in terms of displacement, this means that our midlevel is not zero. To correct this, add a Math node set to Subtract, and drop it between the Noise Texture and Combine XYZ nodes. Let’s give it a subtraction value of
0.5.
Once you do that, you’ll see that our grid is now on the ground.
Now that you know all these new functions of the Geometry Node editor, it’s time to prove your new skills in the following exercise, where you will be making a procedural pyramid complete with openings and doors.
Exercise – making a procedural pyramid generator
Section titled “Exercise – making a procedural pyramid generator”It’s time to put your skills to the test! In this exercise, we’ll be making a procedural pyramid generator.
In Figure 9.15, you will see the end result we’ll try to achieve.

Figure 9.15: The end result
As you can see from Figure 9.15, we’ll be making a procedural pyramid that can be configured in a lot of different shapes. We will be able to procedurally modify how many sides the pyramid has, how high it is, the width of the pyramid, the width of the door, the height of the door, and how many steps tall the door is.
Let’s start by sketching out a rough plan of how we will tackle this Geometry Nodes challenge.
Sketching out the idea
Section titled “Sketching out the idea”To achieve this pyramid shape, we will first have to create a Cone primitive, which we will shape using a Set Position node to get the distinctive steps.
To create the doors, we start with a Cylinder primitive with the same number of sides as the Cone primitive. After extruding this Cylinder primitive, we will have a Boolean object for our doors, which we will cut out using a Mesh Boolean node.
Using the Intersecting Edges output of the Mesh Boolean node, we’ll create door frames at the edges of the doors.
Finally, we’ll add Group Input nodes throughout the whole project to make the variables easy to modify.
Without further ado, let’s get right into making this Procedural Pyramid Generator.
Building up the node tree
Section titled “Building up the node tree”Start by heading over to the Geometry Nodes workspace and adding a new node tree to the default cube.
Let’s detach the Group Input node, as we will not need it just yet. Keep it in your project as we will need it later on to make it easy to configure parameters for our project:
- This project starts with a Cone node. This node primitive will be responsible for the overall shape of our pyramid. Let’s connect it to our Group Output node.
- We immediately see an option called Vertices, which will be responsible for the number of sides our pyramid has. We want to be able to easily change this variable. To do that, let’s drag the gray node connection of the Group Input node to this Vertices input.
- This will create a new value in our Geometry Nodes modifier called Vertices.

Figure 9.16: Modifier Stack
- By default, the value will be
32. Go ahead and change this value to4for now. This will mean our pyramid has four sides - We should change this name so that we can easily remember what this means. To do that, let’s hover our cursor over the Geometry Node editor and press N. This will pop up the right-hand menu of our editor where all the settings reside.
Scroll down until you see Group Sockets in the tab called Group.

Figure 9.17: Group Sockets
Let’s double-click on the Vertices value and rename it Sides.
- While you are in that menu, we can already add more Group Input nodes for the values we will need later. Please add the following inputs by clicking on the + icon in the Group Sockets menu. Be sure to set the variable to the correct datatype:
- Pyramid Width (Float)
- Pyramid Height (Float)
- Door Width (Float)
- Door Height (Float)
- Doorsteps (Integer)
- Doorframe (Float)
- Pyramid Width (Float)
This is what the final Group Sockets list should look like:

Figure 9.18: Finalized Group Sockets list
Now that we have created the appropriate variables for our project, let’s continue building our node tree.
Creating our pyramid shape
Section titled “Creating our pyramid shape”Let’s start by configuring the rest of this Cone node:
- Start by connecting the Pyramid Height variable to the Depth input of our Cone node. This will be responsible for the height of our pyramid. Be sure to increase the value in your modifier stack. For this demo, we went with a value of
10. - Let’s also connect the Pyramid Width variable to the Radius Bottom input of our Cone node. This will be responsible for how wide our pyramid is. Once again, let’s enter
10into the Pyramid Width variable in our Modifier. - Once you have configured all of this, you’ll see that we already have a nice pyramid in our Viewport.

Figure 9.19: Pyramid in the Viewport
We are missing some details though, for example, the steps. Let’s take a closer look at how we’re going to create the steps on the pyramid.
- Start by dropping in a Set Position node after the Cone node and connect a Position node to the Position input. We’re not using the Offset input since we want more control over the positions of each vertex.
- Once you have done that, we will need to round the Z -axis of this Position node.
To do this, let’s add two nodes: Separate XYZ and Combine XYZ. Let’s wire them up as shown here:

Figure 9.20: Separating and combining a vector
- This allows us to easily manipulate each axis of our position vector. Specifically, we will need to round the Z -axis using a Math node set to Round. Drop it between the two Z-value connections.
- Once you do that, you’ll see that barely anything happens. This is because we need to up the resolution of our Cone node. To do that, let’s multiply our Pyramid Height value by eight. This will give us enough resolution per meter of height.
- Drop in a Math node set to Multiply, connect our Pyramid Height value into the first slot, and enter
8into the other slot. Once you have done that, you can connect the output of this Math node to the Side Segments input of the Cone node.
There it is! Our pyramid now has steps!

Figure 9.21: Pyramid with steps
Now that you have your pyramid shape, let’s create the doors!
Creating a Boolean object for the doors
Section titled “Creating a Boolean object for the doors”The next step is creating our Boolean object for the doors. Here’s how to do this:
- Add a Cylinder node to your project.
- Let’s disconnect our Set Position node from our Group Output node for now, and connect our newly added Cylinder node so that we can start configuring it.
- To start, we will take our previously added Sides variable and connect it to the Vertices input of our Cylinder node as well. This will ensure we have the same amount of sides on our cylinder as on our pyramid. Once you do that, you’ll see that our cylinder becomes a cuboid shape. That’s totally normal because we set our Sides variable to
4. - Let’s connect the previously made Door Width variable to the Radius input of our Cylinder node. This will be responsible for the width of the doors. Let’s give our Door Width variable a value of
2in our Modifier. - Let’s also connect our previously made Door Height variable to the Depth input of our Cylinder node. This will be responsible for the height of the doors.
Let’s enter a value of 3 for our Door Height in our Modifier.
Now that we have correctly configured our Cylinder node, it’s time to use an Extrude Mesh node to extrude all the sides of this cylinder. This will be important for when we start to use this object as a Boolean:
- Drop this Extrude Mesh node after our Cylinder node.
- We want to only extrude the sides of our cylinder. To do that, let’s drag the Side output of our Cylinder node to the Selection input of our Extrude Mesh node as shown here:

Figure 9.22: Extrude Mesh node
- Let’s also increase the Offset Scale input to a large value such as
200. Once you do that, you’ll see that you have created an X shape in your Viewport. This is exactly what we want. - Since our cylinder is centered, we will need to offset the movement of our cylinder by half of the height. This will ensure our door moves correctly when changing the height of the door.
To do that, let’s add a Transform Geometry node at the end of our node tree. This will be responsible for moving the door Boolean object.
- We will need to access the Z-value of this node, so let’s add a Combine XYZ node and connect it to the Translation input of our Transform Geometry node.
- To finally perform the right calculation, let’s add in a Math node set to Divide and connect the output to the Z input of the Combine XYZ node.
- Let’s connect the Door Height variable to the first field of our Math node. In the other field, let’s enter
2. This will ensure our Door Height variable isn’t centered anymore and will be anchored to one bottom position.
If you have followed these steps correctly, this is what that part of the node tree should look like:

Figure 9.23: The Boolean door object
We will also want to control how many steps our door is up. To do that, let’s duplicate the Math Divide node and set it to Add. Let’s connect our Doorsteps variable to the second input of this Math Add node. Let’s set the Doorsteps variable to 1.
Combining the pyramid and the doors
Section titled “Combining the pyramid and the doors”Now that we have the main elements of our project finished, it’s time to combine these two objects using a Mesh Boolean node.
Drop in a Mesh Boolean node at the end of your current node tree and let’s connect our Transform Geometry node to the Mesh 2 input. Similarly, let’s connect our previously created Set Position node to the Mesh 1 input. Let’s also set our Mesh Boolean node’s mode from Float to Exact to ensure the calculations happen precisely.

Figure 9.24: Pyramid with doors
We now have our pyramid with doors! To finish off our project, let’s add some nice door frames to these doors. To do this, we’ll utilize the Intersecting Edges value of our Mesh Boolean node, which tells us exactly where the frames of our doors are.
We will take this value, invert it, and delete the rest of the geometry. This will leave us with just the edges, which we can use to perform the necessary modifications:
- To do this, let’s start by adding a Map Range node. We will use this to invert our Intersecting Edges value.
- Let’s connect the Intersecting Edges output to the Value input of the Map Range node.
- To invert the signal, let’s swap the To Min and To Max values. Let’s set them to
1and0, respectively. - Let’s follow this with a Delete Geometry node set to Edge, where we plug in our Mesh Boolean ’s Mesh output to the Geometry input.
- Let’s also connect the Result output of our Map Range node to the Selection input of the Delete Geometry node.
- You will see that nothing happens. That is because we are not currently viewing the Delete Geometry node separately. To do that, let’s connect the Delete Geometry node to our Group Output node. Once you do that, you’ll see where our door frames will be. In Figure 9.25, you’ll see what the result looks like:

Figure 9.25: Door frames visualization
- These are just edges and won’t be visible in any render. To fix this, we’ll have to give thickness to these edges. To do that, let’s put a Mesh to Curve node after our Delete Geometry node. Let’s also immediately follow it with a Curve to Mesh node.
- Nothing happens. That is because we do not have a Profile Curve yet. Let’s add a Curve Circle node as our Profile Curve input. Make sure it has a resolution of
4. - You’ll now see that our door frames appear. However, they appear way too thick. To fix that, let’s connect our previously made Doorframe variable to the Radius input of our Curve Circle node. With this, we’ll be able to control the thickness of the doorframes at any time.
Let’s give our Doorframe variable a value of 0.1.
- Lastly, let’s follow our Curve to Mesh node with a Set Shade Smooth node with Shade Smooth turned off. This will ensure our door frame isn’t shaded smoothly.
That’s everything! The next step is to combine all our created elements.
Combining everything
Section titled “Combining everything”We’re almost there! To combine all our elements together, let’s drop in a Join Geometry node at the end of our node tree. Let’s also drag the output of our Mesh Boolean node to this Join Geometry node again. This will ensure our original pyramid with the doors will be included in the end result.
With that, we have come to the end of this long exercise! Here’s your end result if you have followed the previous steps correctly:

Figure 9.26: Your finished project
Now that you have completed your finished procedural pyramid generator, have some fun and see what all the different variables do! Don’t be afraid to create different combinations.
Summary
Section titled “Summary”In this chapter, we learned how to work with some of the mesh manipulation nodes of the Geometry Nodes workspace; these include the Extrude Mesh node, the Mesh Boolean node, and the Set Position node. You also learned how to utilize these with other nodes, such as a Random Value node. You have utilized all these nodes in making a procedural pyramid generator.
In the next chapter, you’ll put your skills to use where you will be creating a procedural plant generator.