Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Taking Blender to the Next Level
Taking Blender to the Next Level

Taking Blender to the Next Level: Implement advanced workflows such as geometry nodes, simulations, and motion tracking for Blender production pipelines

Arrow left icon
Profile Icon Ruan Lotter
Arrow right icon
₱2285.99 ₱3265.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (5 Ratings)
eBook May 2022 520 pages 1st Edition
eBook
₱2285.99 ₱3265.99
Paperback
₱4082.99
Subscription
Free Trial
Arrow left icon
Profile Icon Ruan Lotter
Arrow right icon
₱2285.99 ₱3265.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (5 Ratings)
eBook May 2022 520 pages 1st Edition
eBook
₱2285.99 ₱3265.99
Paperback
₱4082.99
Subscription
Free Trial
eBook
₱2285.99 ₱3265.99
Paperback
₱4082.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Taking Blender to the Next Level

Chapter 1: Using Geometry Nodes to Create Dynamic Scenes

Geometry Nodes is one of the latest additions to the ever-evolving world of Blender and is one extremely powerful tool. It allows you to create and change an object's geometry in more complex ways than regular modifiers, and it allows you to create complex scenes quickly and in non-destructive ways, meaning you can always go back and tweak some of the parameters, making it extremely dynamic and versatile. Welcome to the exciting world of Geometry Nodes!

One thing to note is that Geometry Nodes is still being developed extensively by the developers of Blender, which means that new nodes will be added, and more workflow options will be available to you, making it one of the most exciting new features to come to the Blender toolset.

In this chapter, you will learn how to use some of the most popular nodes, and you will get a feel of what you can do using Geometry Nodes. You will learn how to distribute objects on points, using Math nodes to calculate attributes such as the distance between objects, as well as how to modify certain attributes such as scale, position, and rotation. Additionally, you will learn how to randomize certain attributes, which is important when creating dynamic motion graphics scenes.

This chapter will give you a good, but basic, understanding of Geometry Nodes, and later in this book, we will make use of other methods that will build on this chapter.

In this chapter, we're going to cover the following main topics:

  • Introduction to Geometry Nodes in Blender
  • Creating and manipulating geometry using nodes
  • Using textures to control attributes
  • Animating with Math nodes

    Technical Requirements

    All the projects in this book have been created and built on Blender 2.93.x. The projects should work perfectly fine with Blender 3.x versions too. There may obviously be slight changes going forward as they develop Blender 3, but most of the changes they usually do are minor and should not break any workflows. However, the Geometry nodes chapters will work strictly on versions 2.93.x, since these nodes are updated with every version change. Version 2.93 has Long Term Support (LTS) till 2023 and you can download it from here. https://www.blender.org/download/lts/2-93/

    All the projects of this book have been uploaded on Github here: https://github.com/PacktPublishing/Taking-Blender-to-the-Next-Level

Introduction to Geometry Nodes in Blender

In this section, we will be looking at the Geometry Nodes workspace and how to apply the Geometry Nodes modifier to our base mesh. Additionally, we will take a quick look at the different nodes that are currently available in Blender. You will learn how to distribute an instance object across points on another object. Additionally, we will make use of some of the most used nodes such as the Point Instance node and the Subdivide node. You will also learn what attributes are and how you can use them to change the way your instance objects are displayed. Finally, we will use nodes to randomize different attributes of our instance objects such as the position, rotation, and scale.

The Geometry Nodes workspace

Geometry Nodes functions as a basic modifier, but it also has its own workspace and editor. If you look at the top of the Blender interface, you should see a tab called Geometry Nodes. Additionally, you can change any window in Blender to the Geometry Nodes workspace by clicking on the drop-down menu in the upper-left corner of the window and selecting Geometry Node Editor from the list of available workspaces. This means you always have control over how you work:

Figure 1.1 – The Geometry Node Editor

Figure 1.1 – The Geometry Node Editor

If you look at the workspace, you will see the 3D Viewport window in the upper-right corner, the Spreadsheet window in the upper-left corner, and the Geometry Nodes window at the bottom. Currently, there is a total of 63 nodes in Blender version 2.93.2, but this number will quickly grow in later versions of Blender:

Figure 1.2 – The Geometry Nodes workspace

Figure 1.2 – The Geometry Nodes workspace

One area that Blender has been lacking in for a while now is in the creation of MoGraph dynamically; Geometry Nodes changes that completely by turning Blender into a powerful MoGraph-making machine! The reason why Geometry Nodes is perfect for MoGraph is that you can quickly manipulate many objects at once and because of its non-destructive nature. Additionally, you can introduce textures to drive movement or even use other modifiers in conjunction with Geometry Nodes.

Another great use for Geometry Nodes is for scattering objects quickly and easily. In previous versions of Blender, we had to make use of a particle or hair system to scatter objects across geometry, and that only gave us a certain amount of control. However, with Geometry Nodes, we have complete control to customize our node tree exactly the way we want.

You can even expose some of the parameters and values directly in the Modifier panel, making it very easy to customize your Geometry Nodes creations or giving you the ability to build custom node setups to share with others.

Geometry Nodes

As mentioned earlier, there are currently 63 available nodes to use (including the Frame and Reroute nodes), as shown in the following screenshot. This number will likely increase with later versions:

Figure 1.3 – All of the Geometry Nodes currently available in Blender 2.93.2

Figure 1.3 – All of the Geometry Nodes currently available in Blender 2.93.2

If you have used the Compositing or Shading workspaces before, then you should be familiar with using nodes. However, don't fear if this is your first time using nodes. It can be very daunting at first, but we will look at the process step by step, and in no time, you will be able to create amazing and dynamic scenes using Geometry Nodes. In the next section, we will create our first, very basic node setup, and see it in action!

Creating and manipulating geometry using nodes

In this section, we will be creating our very first basic scene using Geometry Nodes. You will learn how to add the Geometry Nodes modifier to your base mesh and how to instance an object onto each vertex of your base mesh. We will look at some of the nodes that you can use to manipulate these instances such as Position, Scale, and Rotation. Additionally, you will learn how to randomize certain attributes, and we will also take a look at the different types of attributes and how they are used.

Let's begin by creating a new Blender project.

Creating the base mesh

Let's begin by creating our base mesh. For this example, we will be creating a plane object and applying the Geometry Nodes modifier to it. Then, we will use this plane object to distribute instances of another object across it:

  1. Click on File and select New | General.
  2. Delete everything in your scene by pressing A and then pressing X. Click on Delete to confirm. You now should have a blank new scene. Now feel free to save your project!
  3. Create a plane by pressing Shift + A and selecting Mesh | Plane.

Now, let's scale our plane.

  1. Select the plane, press S, then 10, and then Enter. This will scale your plane to a size of 10 m x 10 m. It's always good practice to select Apply your scale whenever you modify the scale of an object in Blender, especially if you will be adding any modifiers to that mesh.
  2. To do this, select the plane, press Ctrl + A, and then select Scale from the drop-down menu. This will apply the scale factor and reset the object's scale to 1:
Figure 1.4 – Applying the scale to your plane

Figure 1.4 – Applying the scale to your plane

  1. You can view the scale factor by selecting your plane and pressing the N shortcut to open the side menu. In the Item tab, underneath Transform, you will see the Scale factor, which should currently be X: 1.000/Y: 1.000/Z: 1.000:
Figure 1.5 – The scale of the plane set to 1/1/1

Figure 1.5 – The scale of the plane set to 1/1/1

Creating a new Geometry Nodes modifier

Now, let's open the Geometry Nodes workspace by clicking on the tab at the top of the Geometry Nodes interface. You will now see the Geometry Nodes workspace split into three main views: the 3D Viewport window (in the upper-right corner), the Spreadsheet window (in the upper-left corner), and the Geometry Node Editor window at the bottom. Perform the following steps:

  1. To create our first Geometry Nodes system, let's click on our plane to select it.
  2. Click on the NEW button at the top of the Geometry Node Editor:
Figure 1.6 – The Geometry Node Editor

Figure 1.6 – The Geometry Node Editor

Congratulations! You have created your first Geometry Nodes setup! You will see two nodes that have been added automatically: the Group Input node and the Group Output node.

It's important to note that your data will always flow from the Group Input node on the left-hand side to the Group Output node on the right-hand side. Everything between these two nodes will modify our geometry.

Creating our instance object

Before we start adding any nodes to our node setup, we need something to use as our instance object. So, let's create a mesh that we can use:

  1. With your mouse pointer over the 3D Viewport window (in the upper-right corner), press Shift + A and select Mesh | Icosphere.
  2. Select the Icosphere instance in the 3D Viewport window, press G, and then press X to move it along the X axis away from the plane.

In the next section, we will use this Icosphere node as an instance object.

Creating our first nodes

Let's begin adding some nodes! In this section, we will look at how you can add new nodes to the node tree and how to distribute your instance object across your base mesh:

  1. Click on the plane object in the 3D Viewport window to select it.

With your Icosphere instance out of the way and your plane selected, you should now see two nodes in the Geometry Node Editor. If you don't see any nodes, make sure that the Geometry Nodes modifier is selected or has been highlighted in the modifiers panel on the right-hand side:

Figure 1.7 – The Geometry Nodes modifier

Figure 1.7 – The Geometry Nodes modifier

  1. With your mouse pointer over the Geometry Node Editor window, press Shift + A to access the Node Add menu.
  2. Hover over the Point category and click on Point Instance to create your first node.
  3. Click anywhere to place your node.
  4. Now, let's drag our new node onto the line that connects the Group Input node and the Group Output node.
  5. Additionally, you can zoom in and out by scrolling the mouse wheel and pan by holding down the mouse wheel.
  6. Move your Point Instance node closer to the Group Output node as we will be adding new nodes, mainly between the Group Input node and the Point Instance node, in this example:
Figure 1.8 – Your node tree should now look like this

Figure 1.8 – Your node tree should now look like this

Nodes that change attributes should almost always be placed before the Point Instance node, as the points are not referenced after this node.

Specifying the instance object

Note that your plane object has disappeared in the 3D Viewport window! The reason for this is that we have not yet specified an instance object for our Point Instance node.

Let's do this now:

  1. Click on the Object drop-down menu on the Point Instance node to select the Icosphere mesh object that we created from the list earlier:
Figure 1.9 – The Point Instance node

Figure 1.9 – The Point Instance node

  1. You can also click on the eyedropper icon and select the Icosphere object that way.

Now, let's take a look at what has happened in the 3D Viewport window:

Figure 1.10 – Instances are placed on each vertex of the plane

Figure 1.10 – Instances are placed on each vertex of the plane

As you can see, we now have four Icosphere instances. Ignore the original Icosphere instance that we moved off to the side – you can even hide it if you want. The reason we see four Icosphere instances is that our plane has four vertices. It's creating an instance on each vertex. Let's increase the number of vertices by subdividing our plane. We can do this right inside the Geometry Node Editor as there is a Subdivide node that we can use.

The Subdivide node

The Subdivide node will increase the number of points or vertices on our base mesh. Let's examine how we can use it in our scene:

  1. Press Shift + A to access the Add menu, point to the Mesh category, and click on the Subdivide node.
  2. Move the node and place it on the line just right of the Group Input node:
Figure 1.11 – Your node tree should now look like this

Figure 1.11 – Your node tree should now look like this

Notice that you now have nine Icospheres in your scene. The reason for this is that our plane now has nine vertices because of the Level 1 Subdivide node.

  1. Change the subdivision Level value to 3. Now you should see a total of 81 Icospheres because we have increased the number of vertices on our plane to 81:
Figure 1.12 – Increasing the number of vertices will increase the number of instance objects

Figure 1.12 – Increasing the number of vertices will increase the number of instance objects

The Point Scale node

Now, let's change the scale of our Icospheres – there is a node for that, too! Let's add a Point Scale node:

  1. Press Shift + A and select Point | Point Scale.
  2. Slot it in right after our Subdivide node:
Figure 1.13 – Your node tree should now look like this

Figure 1.13 – Your node tree should now look like this

Additionally, you can search for nodes without needing to know where to find them. When you press Shift + A to bring up the nodes menu, click on the Search option at the top and type in the name of the node you are looking for.

Notice that on the Point Scale node, you have access to three different numbers: X, Y, and Z. This is called a vector as it's a set of three numbers. Change one of the numbers by clicking on it and dragging sideways. You will see how the scale of your Icospheres changes according to the axis you scale on. Let's change the Type setting from Vector to Float.

  1. Click on the drop-down menu next to Type and select Float from the list. Now you only have one number to change, which will scale your Icospheres uniformly.
  2. Click and drag the Factor value to adjust the size of the instance. For now, set it to any size you like.

We have now set the scale of our instance objects using the Point Scale node. In the next section, we will look at the different types of attributes available in Geometry Nodes.

Different types of attributes

Let's take a moment to look at the different types of attributes and data types that you will see:

  • Integer: An integer is a number that can be written without a fractional component.
  • Float: A float is a floating-point number, which means it is a number that has a decimal place.
  • Vector: A vector is a set of three float numbers and is mostly used to calculate a position in world space.
  • Boolean: A Boolean only has two values and can be used for something that's either true or false.
  • Attribute: This is a text field to input an attribute name.

The most commonly used attributes are Position, Scale, and Rotation (these are all vector-based as they consist of three numbers, which each correspond to the three axes of X, Y, and Z). However, there are also a few others that we will look at in later chapters.

The Point Rotate node

Let's look at how we can rotate our objects. To do this, we will need a new node called Point Rotate. Let's add it to our tree:

  1. Press Shift + A and select Point | Point Rotate (or you can use the search function).
  2. Add this node to the right-hand side of the Point Scale node:
Figure 1.14 – Your node tree should now look like this

Figure 1.14 – Your node tree should now look like this

You will see that the Point Rotate node uses a Vector data type because you can rotate using the different X, Y, and Z axes.

Click and drag the values next to the different axes to see how your Icospheres rotate in your scene. Please note that the difference between Object and Point is that Object will rotate every point in the local space of the object, while Point will rotate every point in its local space as specified by its Rotation attribute.

The Point Translate node

Next, let's take a look at how to change the position of our objects. For this, we need the Point Translate node. Let's add it now after our Point Rotate node:

  1. Press Shift + A and select Point | Point Translate or use the search function. Again, you will see that it uses a vector as we can translate in either X, Y, or Z.
  2. Drag the values next to X, Y, and Z to see all of your Icospheres moving along that axis:
Figure 1.15 – Your node tree now looks like this

Figure 1.15 – Your node tree now looks like this

The Attribute Randomize node

Our scene still looks very uniform and a bit boring; however, Geometry Nodes allows you to easily randomize your attributes! Let's see how we can randomize the Scale attribute of our Icospheres. For this, we will need a node called Attribute Randomize.

Let's add it now:

  1. Press Shift + A and select Attribute | Attribute Randomize to add the node.
  2. Place it on the right-hand side of the Point Translate node:
Figure 1.16 – The Attribute Randomize node

Figure 1.16 – The Attribute Randomize node

This node is slightly more complex, as we can choose which attribute it will randomize and how it will influence the current attribute values.

Let's examine how we can randomize the Scale attribute.

Randomizing the Scale attribute

We can use the Attribute Randomize node to randomize different attributes. Let's see how we can randomize the Scale attribute of our instance objects:

  1. Click on the empty box next to Attribute. You will see a list of available attributes that we can use.
  2. Select Scale from the list. Instantly, you will see that all of your Icospheres now have different sizes! Additionally, you can type in the attribute name in the empty box. However, note that the attribute names are case sensitive, so be aware of this when typing in an attribute name rather than selecting it from the drop-down list.
  3. The Min and Max float numbers determine the range of randomness. Change these numbers to see how they affect your scene. (Tip: Hold Shift while dragging these values to have more accurate control.)

The default data type value is set to Float, which means we use one number for all three axes, which will result in a uniform scale.

  1. Change this to Vector by clicking on the drop-down list at the top of the node and selecting Vector:
Figure 1.17 – The Attribute Randomize node

Figure 1.17 – The Attribute Randomize node

Now we have much more control over how our instances will be scaled. We can adjust the minimum and maximum values for all three X, Y, and Z axes.

  1. Adjust the three values under Min and Max to see how this affects your scene and how the scaling is no longer uniform by adjusting these values:
Figure 1.18 – The 3D Viewport window showing non-uniform scaling because of the vector

Figure 1.18 – The 3D Viewport window showing non-uniform scaling because of the vector

  1. This might be the desired effect you are going for, but let's change the data type back to Float so that we're scaling our instance uniformly.
  2. Set the Min value to 0 and the Max value to 1. Notice that some of the Icospheres are not being displayed or might be very tiny. This is because we're using the Replace/Create operator, which means we're choosing a value between 0 and 1 and replacing the current Scale attribute with this new number. Note this value can be 0, which will result in some Icospheres with a scale of 0, making them disappear.
  3. Change the operator setting from Replace/Create to Add.

Now we are adding our random value to the current Scale attribute, which will not result in Icospheres with a scale of 0. Other operators you can use are Multiply and Subtract, which work in a similar way to the Add operator.

Randomizing the Position attribute

Let's randomize the position of our Icospheres!

This time, we're going to duplicate our Attribute Randomize node and reuse it for the Position attribute:

  1. Click the current Attribute Randomize node to select it.
  2. Press Shift + D to create a duplicate copy.
  3. Drag the new copy to the right-hand side of the current Attribute Randomize node:
Figure 1.19 – The Attribute Randomize node

Figure 1.19 – The Attribute Randomize node

Let's configure the node as follows:

  1. Change the data type to Vector. The reason for this is that we want to randomize the X, Y, and Z positions for each instance.
  2. Set the Operator setting to Add.
  3. Select the position attribute from the Attribute drop-down box, or you can simply type position into the box. Please note that attribute names are case sensitive:
Figure 1.20 – Your node tree should now look like this

Figure 1.20 – Your node tree should now look like this

  1. Set your Min value to -10 and Max value to 10. This will randomize our Icospheres' positions from -10, -10, and -10 to 10, 10, and 10 in world space:
Figure 1.21 – The 3D Viewport window showing the randomized positions

Figure 1.21 – The 3D Viewport window showing the randomized positions

Randomizing the Rotation attribute

Let's randomize the rotation of our Icospheres. For this, we will again duplicate our Attribute Randomize node and place it on the right-hand side of the position Attribute Randomize node:

Figure 1.22 – The Attribute Randomize node

Figure 1.22 – The Attribute Randomize node

Let's configure this node as follows:

  1. Change the data type to Float. The reason we're using a float is that we want to use one value to rotate our instance in all axes. You can use a vector to have exact control over how we rotate. However, for this example, we're going to use a float.
  2. Change the Operator setting to Replace/Create.
  3. Change the Attribute setting to rotation:
Figure 1.23 – Your node tree and scene should now look like this

Figure 1.23 – Your node tree and scene should now look like this

  1. Set the Min value to 0 and the Max value to 10:
Figure 1.24 – The 3D Viewport window showing randomized rotations

Figure 1.24 – The 3D Viewport window showing randomized rotations

Changing the instance object

It's very easy to change your instance object into something else. Let's do that now.

Start by creating a new instance object in our scene. For this, we will be adding a Suzanne object:

  1. With your mouse pointer over the 3D Viewport window, press Shift + A and select Mesh | Monkey.
  2. Move the Suzanne mesh to the side of our scene by pressing G and then pressing X.
  3. Click on one of the Icospheres to view your Geometry Nodes.
  4. Click on the Point Instance node to select it.
  5. Click on the Icosphere item next to Object and select Suzanne from the drop-down list:
Figure 1.25 – The Point Instance node

Figure 1.25 – The Point Instance node

Now, let's take a look at what happened in the 3D Viewport window:

Figure 1.26 – Updated instances in the 3D Viewport window

Figure 1.26 – Updated instances in the 3D Viewport window

Muting nodes

You can also mute or deactivate certain nodes to see exactly what they do. This is good practice for troubleshooting your node tree. To do this, highlight the node or nodes you want to mute and press the M shortcut.

Now, let's mute our three Attribute Randomize nodes:

Figure 1.27 – Muting nodes by selecting them and pressing M

Figure 1.27 – Muting nodes by selecting them and pressing M

Observe how your scene will update instantly! You can unmute/reactivate these nodes again by selecting them all and pressing M again.

Congratulations! You have now created your first basic scene using Geometry Nodes. Please save your project now, as we will continue to work on it during the next section.

Using textures to control attributes

In this section, we will be using textures to manipulate attributes to create interesting and more complex scenes. You will learn how to use the Attribute Sample Texture node to change specific attributes using a texture map.

Let's begin by making some changes to the scene that we saved in the previous section:

  1. First, let's delete all three of our Attribute Randomize nodes. You can highlight them all at once and press X to delete them. However, remember to reconnect the line between the Point Translate node and the Point Instance node. Additionally, you can also use the Ctrl + X shortcut when deleting nodes while keeping the connection in place.
  2. Next, let's increase our level of subdivisions to 5 by adjusting the Level value on the Subdivide node. This will increase the number of instances we have in our scene.
  3. Also, decrease the Point Scale factor to 0.2 to decrease the size of our Suzanne instances:
Figure 1.28 – Your node tree and scene should now look like this

Figure 1.28 – Your node tree and scene should now look like this

Now, let's take a look at what happened in the 3D Viewport window:

Figure 1.29 – The 3D Viewport window showing the updated scene

Figure 1.29 – The 3D Viewport window showing the updated scene

The Attribute Sample Texture node

Now it's time to introduce a new node called the Attribute Sample Texture node. This node is used to sample a texture and apply the results to an attribute such as Rotation, Scale or Position:

  1. Add a new Attribute Sample Texture node to your node tree between the Point Translate node and the Point Instance node:
Figure 1.30 – The node tree

Figure 1.30 – The node tree

  1. Click on New on the Attribute Sample Texture node to create a blank texture.
  2. You can also name your texture here – let's call it MyTexture.
  3. Click on the Show texture in texture tab icon on this node to open the new texture in the texture side menu:
Figure 1.31 – The Attribute Sample Texture node

Figure 1.31 – The Attribute Sample Texture node

Your texture will now be displayed in the side menu:

Figure 1.32 – The texture side menu

Figure 1.32 – The texture side menu

  1. Let's change the texture type by clicking on the drop-down list that is currently showing Image or Movie. For now, change this to a Wood texture:
Figure 1.33 – The Wood texture

Figure 1.33 – The Wood texture

Nothing will happen yet as we still need to configure our new node. Let's do that next.

Back in the Geometry Node Editor, let's take a look at the Attribute Sample Texture node. It has two attribute slots that we can use. The Mapping attribute is used to determine where and how the texture is evaluated.

  1. Click on the empty box next to Mapping and select UVMap from the list of attributes.
  2. The Result setting can be any attribute we want to affect using the texture. So, let's choose scale. You can either select it from the drop-down list or type the word scale, in lowercase, and then press Enter:
Figure 1.34 – Your scene will now update and should appear like this

Figure 1.34 – Your scene will now update and should appear like this

Notice that our instance's scale has been updated and matches our wood texture. Where we have black pixels, the scale factor will be set to 0. And where we have white pixels, we will have a scale factor of 1. Feel free to experiment with other texture types to see how it affects your scene.

You can even load your own custom image texture by choosing Image or Movie as the Type setting and then clicking on Open to load your image:

Figure 1.35 – Loading a custom image texture

Figure 1.35 – Loading a custom image texture

Try loading a grayscale image to see how it affects the scale of your instances. The following example uses a grayscale image of the Blender logo:

Figure 1.36 – Here is an example of using a grayscale Blender logo

Figure 1.36 – Here is an example of using a grayscale Blender logo

For this example, I've moved the Point Scale node after the Attribute Sample Texture node and lowered the value to 0.4. The reason for placing the node here is that our Attribute Sample Texture node is changing our scale attribute. Therefore, any node before the Attribute Sample Texture node will not have any effect on the scale attribute. Remember that the data is flowing from left to right:

Figure 1.37 – This is what your node tree should look like to get this effect

Figure 1.37 – This is what your node tree should look like to get this effect

By now, you should have a basic understanding of what Geometry Nodes is and how it can be used to create amazing patterns or scenes.

In the next section, we will look at how to add keyframes and animation to our Geometry Nodes using basic math.

Animating with Math nodes

In this section, we look at how to create interesting animations using Math nodes and other objects in your scene. We will create a basic scaling animation by using the distance value between two objects in our scene and modify the scaling attribute using some easy math. So, let's get started!

For this section, you can start with a new Blender project:

  1. Delete all of the default objects by pressing A and then pressing X to confirm the deletion.
  2. Create a plane object by pressing Shift + A and selecting Mesh | Plane.
  3. Using the pop-up Add Plane dialog box in the lower-left corner of the 3D Viewport window, set the Size setting of the plane to 10 m. Click anywhere in the viewport to confirm these parameters:
Figure 1.38 – The Add Plane dialog box

Figure 1.38 – The Add Plane dialog box

  1. With the plane selected, click on the Geometry Nodes tab at the top of the interface.
  2. Click on the New button to create a new Geometry Nodes modifier on the plane. You should now see the Geometry Node Editor with two default nodes, Group Input and Group Output.
  3. Let's create our instance mesh. With your mouse pointer hovering over the 3D Viewport window, press Shift + A and select Mesh | Torus.
  4. Scale down the torus by 50% by pressing S and then pressing 0.5.
  5. Move the torus out of view by pressing G then pressing X. Move the mouse until it's away from our plane object.
  6. Most importantly, we need to apply the scale of this torus; otherwise, we might run into some interesting surprises later. With the torus selected, press Ctrl + A and click on Scale. Now, let's jump back into our node tree!
  7. Select the plane to enable the Geometry Nodes view. Remember, if you still can't see the nodes, ensure that the Geometry Nodes modifier is highlighted if you have other modifiers in this object.

Now, let's add our first nodes.

  1. For node number one, we will create a Subdivide node. Slot it in just after the Group Input node.
  2. Additionally, we need a Point Instance node to instance our mesh. Slot it right before the Group Output node.
  3. Set your Subdivide node Level to 3.
  4. Select your new Torus object from the drop-down list of the Point Instance node:
Figure 1.39 – Your node tree should now look like this

Figure 1.39 – Your node tree should now look like this

Note that you have lots of tori in your scene. Yup, I also didn't know that the plural of a torus is tori until now!

Now, let's create a new cube object in our scene that we will use to calculate some math later on:

  1. Hover over the 3D Viewport window, press Shift + A, and select Mesh | Cube.
  2. Move the cube to the edge of our torus instances by pressing G and then pressing X:
Figure 1.40 – Your scene should now look like this

Figure 1.40 – Your scene should now look like this

  1. Back in our node tree, click on one of the torus instances to view the node tree if it's not visible.
  2. Add a new node, called the Object Info node, by pressing Shift + A and selecting Input | Object Info or using the search function. We are not going to connect this node to our other nodes at this moment – just place it directly beneath the Subdivide node. We are going to use this node to calculate the distance between our tori and the cube object.
  3. On this Object Info node, click on the Object drop-down list and select the Cube object from the list. You can also use the eyedropper tool.
  4. Then, click on the Relative button. This will calculate the current information of the cube and not just the original data:
Figure 1.41 – The Object Info node

Figure 1.41 – The Object Info node

Great! You should now have enough instance objects in the scene. In the next section, we will use basic math to calculate the distance between the cube object and each of the instance objects.

The Attribute Vector Math node

Now, let's create our first Math node – the Attribute Vector Math node. There are a few Math nodes available, but for this specific example, we need to use the Attribute Vector Math node because of its Distance operator:

  1. Press Shift + A and select Attribute | Attribute Vector Math.
  2. Slot it in right after the Subdivide node:
Figure 1.42 – Your node tree should now look like this

Figure 1.42 – Your node tree should now look like this

Notice that the Object Info node is not yet connected.

Important Note

One thing to bear in mind is that any node that uses an attribute is calculating that attribute for each instance in every frame.

Now, let's take a moment to look at the Attribute Vector Math node and how we will use it. We want to calculate the distance between our Cube object and every Torus instance object. We already have the position value of each Torus instance saved in the position attribute, and with our Object Info node (connected to our cube object), we also have the relative position of the cube. Let's see how we can calculate the distance.

  1. First, let's change the operation of our Attribute Vector Math node from Add to Distance by clicking on the top drop-down menu on the node and selecting Distance from the many different operations available.
  2. Then, change B from Attribute to Vector. The reason we're using a vector here is that the cube's position will be a type of vector for each axis:
Figure 1.43 – Your node should now look like this

Figure 1.43 – Your node should now look like this

  1. For attribute A, we want to use our torus positions. To do this, click on the empty box next to A and select position from the list or enter the word position and press Enter.
  2. For attribute B, we want to use our cube's position, so let's connect our Object Info node's Location to the Attribute Vector Math node's B input.

Now we need to save the result of this operation to an attribute. Here, we can create our new attribute by entering a new attribute name that's not in use, but an easier option would be to simply overwrite the current scale attribute with our new result. Let's do that next.

  1. Click on the empty box next to Result and select scale from the list. If you don't see the scale attribute in the list, you can type in the word scale and press Enter:
Figure 1.44 – Your node tree should now look like this

Figure 1.44 – Your node tree should now look like this

  1. Looking at the 3D Viewport window, you will see that the scale of the instance objects has changed. Instances closer to the cube have a smaller scale, while instances further away from the cube have a bigger scale value. Please refer to the following screenshot:
Figure 1.45 – You will see something interesting happening in the 3D Viewport window

Figure 1.45 – You will see something interesting happening in the 3D Viewport window

As you can see in the 3D Viewport window, our scale factor is currently too big. We can use some more basic math to change that:

  1. Add a new Attribute Math node and slot it in after the Attribute Vector Math node. Note these are different nodes – one uses vectors and the other uses float data types.

We want to make our scale factor smaller, so let's use the divide operation to do this. We will perform a simple calculation to make our scale factor smaller:

scale / value = smaller scale

  1. Change the operation at the top of this node from Add to Divide. Leave A as Attribute, but let's change B to Float. This will give us access to change this value manually.
  2. For Attribute A, select scale from the drop-down menu, or you can enter it manually and press Enter to confirm.

For the Result setting, we can overwrite an existing attribute. In this example, let's overwrite the scale attribute. To do this, click on the empty box next to Result and select scale from the list. Again, you can enter this manually and press Enter to confirm.

Your tori will disappear from the 3D Viewport window because we are now dividing by 0, resulting in their new scale being 0.

  1. Let's change our B value by clicking and dragging the Float value to the right-hand side – find a number that gives you good results. I chose 10.

Let's examine our node tree:

Figure 1.46 – Your node tree should now look like this

Figure 1.46 – Your node tree should now look like this

First, we are subdividing our plane into three levels. Then, we calculate the distance between our cube object and every torus in our scene by using the Attribute Vector Math node. We then save this distance value into our existing scale attribute, overwriting the current value. Following this, we divide our new scale attribute by 10 (the float we entered manually), resulting in a smaller scale factor.

Now, let's move our cube around the scene to see the effect in action.

  1. Select your cube in the 3D Viewport window and press G. Then, press Shift + Z. This key combination will limit your cube's movement to the X and Y axes, excluding the Z axis. As you can see, you have created a cool-looking scaling animation. The closer the cube gets to a torus, the smaller the torus will become.
  2. Experiment by adding some position keyframes to your cube and see what you can create:
Figure 1.47 – Your first Geometry Nodes scene that animates dynamically

Figure 1.47 – Your first Geometry Nodes scene that animates dynamically

Using this method, you can easily create interesting and dynamic motion graphics scenes inside of Blender. Experiment with this technique and try to affect the rotation or position of your instance objects rather than their scale. Have fun creating interesting animations!

Summary

Congratulations! You should now have a basic understanding of how to create different Geometry Nodes and how to use them to change certain attributes to create dynamic effects. Now, let's use what we have learned to create something more interesting.

In the next chapter, we will create a motion graphics scene using all of the techniques we've learned so far. Additionally, we will look at how to apply materials to our instance objects!

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn how to use geometry nodes to create motion graphics and dynamic scenes
  • Understand organic 3D modeling and how to create and animate your own 3D characters
  • Use physics simulations to create clothing and hair for characters that interact with forces like wind

Description

If you're ready to start exploring the more advanced workflows and processes in Blender to create intricate 3D models, then Taking Blender to the Next Level is for you. This book focuses on a few different VFX-related workflows such as geometry nodes, organic modeling, 3D camera tracking, photogrammetry, sculpting, compositing, and physics simulations. You’ll learn how to use geometry nodes to create dynamic motion graphic scenes as well as perform 3D scanning of real-world objects using photogrammetry. You’ll also find out how to model, rig, and animate your own 3D characters from scratch. Next, you’ll progress to using simulations to break objects apart and then use cloth and hair simulations to add realism to your 3D creations. Finally, you’ll go over the final render settings and export your 3D animation masterpiece as a video. By the end of this Blender book, you’ll be able to model your own 3D characters, objects, and landscapes; rig, animate, and texture your characters; 3D track live-action footage; and composite your 3D characters into live-action scenes.

Who is this book for?

This Blender 3D book is for 3D modelers, texture artists, character and technical animators, matchmove artists, compositors, and anyone interested in learning advanced concepts in Blender. Motion graphics artists will also benefit from this book. A solid understanding of 3D concepts and the Blender UI is needed to grasp the concepts present in this book.

What you will learn

  • Use geometry nodes to quickly create complex 3D scenes and motion graphics renders
  • Create realistic textures using physically based rendering materials
  • 3D scan real-life objects using a normal camera and clean up the model using Blender
  • Understand how to model, rig, and animate your own 3D characters
  • Use rigid body simulations to create dynamic scenes
  • Understand how to perform 3D tracking within Blender
  • Become well-versed with compositing 3D renders into live-action footage

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 30, 2022
Length: 520 pages
Edition : 1st
Language : English
ISBN-13 : 9781803243825
Vendor :
Blender Foundation
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : May 30, 2022
Length: 520 pages
Edition : 1st
Language : English
ISBN-13 : 9781803243825
Vendor :
Blender Foundation
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 8,931.97
Taking Blender to the Next Level
₱4082.99
Learn Blender Simulations the Right Way
₱2296.99
Blender 3D Incredible Models
₱2551.99
Total 8,931.97 Stars icon

Table of Contents

18 Chapters
Part 1: Modeling, Materials, and Animation Workflows Chevron down icon Chevron up icon
Chapter 1: Using Geometry Nodes to Create Dynamic Scenes Chevron down icon Chevron up icon
Chapter 2: Creating a Motion Graphics Scene Using Geometry Nodes Chevron down icon Chevron up icon
Chapter 3: Organic Modeling P1: Creating a Mushroom Chevron down icon Chevron up icon
Chapter 4: Organic Modeling P2: Creating the Landscape around the Mushroom Chevron down icon Chevron up icon
Chapter 5: PBR Materials: Texturing our Mushroom Scene Chevron down icon Chevron up icon
Chapter 6: 3D Scanning and Photogrammetry: Creating Your Own 3D Scans Chevron down icon Chevron up icon
Chapter 7: Modeling an Alien Cartoon Character Chevron down icon Chevron up icon
Chapter 8: Rigging and Animating Your 3D Cartoon Character Chevron down icon Chevron up icon
Part 2: Let's Do Some Physics Chevron down icon Chevron up icon
Chapter 9: Rigid Body Simulation: Destroying a Statue Using Physics Chevron down icon Chevron up icon
Chapter 10: Dynamic Cloth Simulations Chevron down icon Chevron up icon
Chapter 11: Creating Dynamic Hair Using Particles Chevron down icon Chevron up icon
Part 3: Match Moving and Compositing Chevron down icon Chevron up icon
Chapter 12: Matching Blender's Camera Movement to Live Action Footage Chevron down icon Chevron up icon
Chapter 13: Compositing the Alien Cartoon Character onto the Live Action Footage Chevron down icon Chevron up icon
Chapter 14: The Final Render Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(5 Ratings)
5 star 60%
4 star 40%
3 star 0%
2 star 0%
1 star 0%
Stephen K. Jan 15, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I’ve had a few Blender books but this is the best. The author, Ruan Lotter, must have experience writing educational books because that is the way this one is structured. At the beginning of each chapter he list the topics covered and has a summary at the end of each chapter. This helps when you are working on a project and need to refer back to the book for help on a process. You will need a basic understanding of Blender.
Amazon Verified review Amazon
Cooper Jul 20, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you know your way around the 3d environment and are new to Blender. This book is a good place to start.You'll learn more in the first project in this book than you will in a week of random online tutorials.Ya dig..?!?
Amazon Verified review Amazon
Michael Steffens Jun 06, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I will start off by saying that I have not been able to finish the entire book just yet due to some unforeseen life event but it has been great so far. I would say I am in the Beginner/Intermediate range for my knowledge and skill base for blender so taking on this book I was a little worried it would take me a long while to pick up on some of the more advanced topics but I was definitely wrong.Each chapter that I have been through, I am just starting Part 2 Chapter 9, has had just the right amount of details for me describing each NEW word/jargon that we would be covering in that chapter. The details were in that sweet spot of not being to wordy where you lost yourself in a sea of words but was right to the point while giving you everything you need to learn/complete that section. One of my favorite parts of going through the chapters is the words to images ration as well. Being an engineer by trade I have dealt with a lot of manuals and walkthroughs such as this book, Taking Blender to the Next Level has the perfect flow of giving you the details you need then giving you wonderful graphics that also show what/where you are supposed to be doing these steps inside of Blender!! The amount of times this has helped me out and just been way more user friendly than most other training books that I have dealt with in school and my job!Another part of this book that I have enjoyed so far is that way the lessons build on each other without being totally separate problems/models that you are tackling. For example going through chapters 3 & 4 building not just the mushroom but an entire scene around the mushroom. This way of building on the past chapter gave me to practice to create more than just the Mushroom/Donut/Tree whatever it may be. For me this just gives me the better work process for in the future when I want to create a full scene inside of a single model/image.I also create content so being able to use blender for thumbnails and some fun little side projects has been wonderful. This book has helped me take that part of my creative flow up a notch. I will continue to use the new chapters coming up in the work and I can't wait to finish everything up! Ruan Lotter wrote a wonderful blender book that really anyone can just pick up and jump in with. Having knowledge of the program helped but like I stated the work flow that he gives in the chapters is very user friendly and easy to understand with the descriptions he gives plus the images that go with the details!! I suggest this book to anyone interested, even a little bit, in learning Blender and 3-D modeling in general!!!
Amazon Verified review Amazon
A. Hennig Feb 06, 2023
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Ein hervorragendes Buch, aber leider für die Version 2.93 geschrieben. Leider ist diese kaufentscheidende Information tief im Buch versteckt, gehört aber auf die Titelseite. Benutze die Version 3.4 und entdecke doch einige Veränderungen. Grade bei den "Geometry Nodes" finden bei Blender zur Zeit sehr viele Neuentwicklungen statt und da sollte man auf die neuesten Bücher / Tutorials zugreifen.Absolute Anfänger werden sich schwertun, sei es wegen der Sprache oder der Nomenklatur.Auf jeden Fall ein lohnendes Buch für Fortgeschrittene !
Amazon Verified review Amazon
BL May 18, 2024
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The book takes a project based approach by which the reader learns by doing. Instructions are very thorough and even beginners can follow. You can download the pictures in a pdf if you’re not happy with the printed ones.It’s written with Blender v2.93 and 90% of the contents are still relevant in Blender v3.x with the exception of Geometry nodes (GN). GN was introduced in v2.92 but was “re-imagined” in v3.0 and most of the Attribute related nodes just went obsolete.There are only a few editorial mistakes and I was able to complete all of the exercises without much problem. (p.311: you need to change the physics properties setting of the cannon ball to animated for the collision to work; p.416: you need to press the Setup Tracking Scene button before setting up the floor orientation; p430: images must be sorted in ascending order). The cloth simulation doesn’t work very well in v3.x and I suppose it’s somewhat broken (I tried v2.93 and it seems to be fine).If the author intends to publish a 2nd edition (v4.x?), I’d suggest that:(a) The geometry nodes section be removed as it deserves a book of its own;(b) The Cell Fracture section be expanded to cover texturing of the fragments;(c) More coverage on character rigging (advanced topics);(d) More coverage on animation like controlling camera movement during an animation.(The GN exercises can all be completed in v3.x with the help of other nodes:chapter 1 (p.29): points node, Wave Texture node(bands across diagonal axis), object info node, instance on points nodechapter 1 (p.37): position node, geometry proximity (or distance (vector math)) node, instance on points nodechapter 2 (p.63): named attribute node, object info node, instance on points node, combine XYZ node, multiply (math) node.chapter 4 (p.135): named attribute node, collection info node, distribute points on faces node, instance on points node, random value node.)
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.