Skip to content
ImagineWorld

Making Use of Node Primitives

node_idnode-book_procedural-3d-modeling-using-geometry-nodes-in-blender_chapter-04-making-use-of-node-primitives
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num4
chapter_titleMaking Use of Node Primitives
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 4 — Making Use of Node Primitives

Section titled “Chapter 4 — Making Use of Node Primitives”

In the previous chapter, we introduced you to the various add-ons we can use along with the Node editor. In this chapter, we will introduce you to the node primitives of the Blender Geometry Node editor, why you should use them, where you can find them, and the different kinds of nodes. Lastly, we’ll end the chapter with an exercise on node primitives.

In this chapter, we will be covering the following topics:

  • Introduction to node primitives
  • Exploring Mesh node primitives
  • Understanding Curve node primitives
  • Exercise – your first Geometry Nodes project

Node primitives allow you to place primitive shapes into your scenes by using various nodes.

However, firstly, what are primitives?

Primitives are shapes that are relatively simple in terms of geometry or can be calculated using a mathematical equation. In Blender, these objects include a grid, a cube, a cylinder, and two different types of spheres.

Curves also have various primitives. These include a line, a circle, a star, a spiral, and a Bezier curve.

Node primitives are really easy to use. Each node primitive will likely convert a bunch of parameters into a single mesh/curve object that will be outputted as a geometry output node socket.

However, why should we use node primitives? They are really useful because we can change the properties of these shapes while working in the Node editor. It’s a matter of changing a value or slider to change the shape of the primitive.

Node primitives can be found in the Add menu in the Geometry Node editor. The Add menu can be accessed by clicking on Add at the top of your Geometry Nodes window or by pressing Shift + A:

Figure 4.1: The Add menu

This menu will have all the nodes of the Geometry Node editor, including the ones we’ll cover, the Curve primitives, and the Mesh primitives, which are highlighted in Figure 4.1. Hovering over these entries with your mouse will expand the chosen menu.

We will begin with the Mesh node primitives.

Mesh node primitives will generate a primitive shape of your choice in the datatype of a mesh output. These include Cone, Cube, Cylinder, Grid, Ico Sphere, Mesh Circle, Mesh Line, and UV Sphere. These nodes will basically generate a mesh inside your Geometry Node editor.

Mesh nodes can be found in the Add menu. As stated before, the Add menu can be found by pressing Shift + A. You will find the Mesh entry in the dropdown that appears (see Figure 4.1). When hovering your mouse over the Primitives menu, you will see the menu shown in Figure 4.2:

Figure 4.2: Mesh Primitives menu

This menu will show all the mesh primitive nodes that we will be explaining in this section. Let’s get into it!

The Cube node primitive (see Figure 4.3) is one of the most basic node primitives that you will be using. This allows you to place cubes in your Geometry Nodes projects:

Figure 4.3: Cube node primitive

As you can see in Figure 4.3, we have a vector input that defines the X, Y, and Z dimensions of the cube. Using this node, we can also control the number of vertices that this cube will contain on each axis. This is comparable to adding loop cuts to a cube in Edit Mode. The node outputs the generated cube mesh using a geometry output.

The node outputs the Mesh of the Cube we generated in this node primitive, along with the UV Map output of the cube in a Vector format.

The Grid node primitive (see Figure 4.4) allows you to create a mesh that is essentially a plane. This will be useful when you want to start your Geometry Nodes project with a plane shape (also referred to as a grid):

Figure 4.4: Grid node primitive

Much like the Cube node Primitive (see Figure 4.3), we can control the X and Y dimensions of this plane by using the value input sockets or by changing the values directly. We also have the option to change the X and Y vertex count again. This will add subdivisions on each of these axes, much like with the Cube node primitive.

Just like the last node, the outputs of this node are Mesh and UV Map, which we can use to manipulate the object further.

The UV Sphere node primitive (see Figure 4.5) will allow you to create a sphere while having control over the segments, rings, and radius of the outputted sphere. This is useful when you want to control the vertical and horizontal resolution of your sphere:

Figure 4.5: UV Sphere node primitive

Let’s quickly go over the options that this node presents:

  • Radius: This is half the size of the UV Sphere, in meters
  • Segments: These are the vertical rings that the sphere will have; in other words, they’re the vertical resolution of your sphere
  • Rings: These are the horizontal rings that the sphere will have – the horizontal resolution of your sphere

You might be wondering: What’s the difference between rings and segments?

In Figure 4.6, you can perfectly see what rings and segments do. Segments define the horizontal resolution, and rings define the vertical resolution.

Figure 4.6: Segments and rings

Now that you know how to use the UV Sphere node, let’s move on to learning about a different kind of sphere.

Like UV Sphere, Ico Sphere (see Figure 4.7) is also a sphere. The difference is that Ico Sphere is made up of triangular faces, and they’re not connected with segments and rings. Instead, they form an even topology.

Figure 4.7: Ico Sphere node primitive

While the UV sphere and the Ico Sphere might both be spheres, there is a crucial difference in the topology of the two options. In the following figure, you can see the difference in the topology:

Figure 4.8: Difference between UV Sphere and Ico Sphere

The UV Sphere consists of segments that connect to a single vertex at the top and bottom, along with rings that stretch around the sphere.

The Ico Sphere has a better-defined, more even topology. A great topology is crucial if we want to modify any kind of mesh, such as when you want to displace your mesh, which we will explain in Chapter 13.

As shown in Figure 4.7, the Ico Sphere node primitive consists of a Radius value and a Subdivisions value; the Subdivisions value simply defines the resolution of the Ico Sphere, while Radius controls the scale of the sphere by increasing its radius.

The Mesh Line node primitive (see Figure 4.9) defines a simple line mesh:

Figure 4.9: Mesh Line node primitive

There are two different options for this node, Offset and End Points, as seen in Figure 4.10:

Figure 4.10: Different Mesh Line modes

In the Offset mode of this node, we can control the Start Location and Offset values. Both of these can be controlled via a vector node socket.

The Count input defines how much each offset should be repeated with a new mesh line iteration. The Count also defines how many vertices are contained in the mesh line.

The End Points mode of this node will add points to your line by first defining the start and end points, and then allowing you to add points in between these two vector locations. Using the Count option, you will get precise control of how many vertices there will be in your mesh line. Using the Resolution option, you will be able to control how many vertices there will be in the mesh based on the allowed distance per vertex. For example, a resolution of 0.7 meters will place a vertex every 0.7 meters apart from each other.

The Cone and Cylinder node primitives (see Figure 4.11) are two of the more advanced node primitives in the Geometry Node system:

Figure 4.11: Cylinder and Cone node primitives

To make learning this node easier, let’s break it down by its inputs and outputs:

  • The Vertices integer value defines how many vertices each ring will contain (the rings are the horizontal lines of the object).
  • The Side Segment integer value allows you to control the number of these horizontal lines or rings.
  • The Fill Segments integer value allows you to control the inner rings of the top and bottom face. These rings will stay and loop around on only the bottom and top faces.
  • The two radius values (one radius value in the case of the Cylinder node) define the radius on the top and bottom of the object. For example, to make a cone correctly, you have to set Radius Top to 0.
  • The last value, the Depth value, defines the height of your cylinder or cone.

Both nodes share the same output sockets; one output socket is used to output your object geometry, and the other three Boolean values define the top, bottom, and sides of your mesh. These node outputs can be used on Boolean node inputs for cases such as mesh selection and other Boolean node connection use cases.

When we click on the Fill Type menu, we are presented with three fill type options, as you can see in the following figure:

Figure 4.12: Fill Type menu

Let’s understand these options here:

  • None: This means that it will not fill in the top and bottom faces; the top will be open
  • N-Gon: This means that the center face at the top will be joined into one N-Gon face.
  • Triangles: This means that the center faces at the top will be joined into a star shape or multiple triangles to prevent N-Gons since we do not want messy topology

In Figure 4.13, you can see a visual representation of what the different fill types mean:

Figure 4.13: Different fill types

Now that you have a solid understanding of the different Mesh node primitives, let’s take a closer look at the Curve node primitives!

Curve node primitives are the basic curve shapes that you can use in the Geometry Node editor. These include Arc, Bezier Segment, Curve Circle, Curve Line, Curve Spiral, and more.

Just like the Mesh node primitives, the Curve node primitives can be found in the Add menu (see Figure 4.1), under the Curve entry, in the Primitives sub-menu. Once you hover your mouse over this entry, the menu shown in Figure 4.14 should pop up:

Figure 4.14: Curve Primitives menu

Each entry in this menu is a Curve node primitive. We will explain the commonly used ones in this heading, so without further ado, let’s get right into the Curve node primitives.

Using the Curve Line node, we can define a straight path. This will be useful when you want to align objects along a straight line or when you want to create a pole. This can be done by giving the curve thickness:

Figure 4.15: Curve Line node primitive

There are two different modes in which we can use this node. These two modes are called Points and Direction. In the following screenshot, you can see the values each mode presents:

Figure 4.16: Different modes

Using the Points mode, we can simply define the Start and End vector locations of the line. If you want to make the line longer, you must modify the End location and move it further away from the Start location vector.

Using the other mode, the Direction mode, we can define the Start location and give a direction that it should follow, depending on the use case; for example, if you want to define a direction, this might be a better choice. Along with the Direction vector, we also get the option to define the length of the line. The output of this node will give a line of type Curve following the parameters you have entered.

The Curve Circle node will add a circle to your Geometry Node editor by making use of curves. This can be useful to make shapes aligned in circles or to make a donut by giving the Curve Circle shape thickness by using a Curve to Mesh node. Keep in mind that the Curve to Mesh node will also require a Profile Curve input. This will be explained in the coming chapters.

Figure 4.17: Curve Circle node primitive

Just like the Curve Line node, we are presented with two different modes for defining the shape of this circle: Points and Radius.

Figure 4.18: Different modes

The Points mode is used to create a circle based on the placement of three X, Y, and Z points. These points can also be controlled by a vector node input.

The Resolution integer value defines how many vertices this curve circle should contain.

When we switch over to the Radius mode, we are presented with a much simpler interface, and this is the option you will be using the most. In this mode, we can only change the radius and resolution of the circle. Just like in the Points mode, the resolution defines how many vertices the curve circle should contain.

The next primitive is Bezier Segment. This will define a Bezier curve using four vector values – Start, Start Handle, End Handle, and End:

Figure 4.19: Bezier Segment node primitive

Once again, this node has been equipped with two different modes to define a primitive curve. If you have ever worked with Blender curves before, you will know what handles are.

For those who have not worked with handles in Blender, they essentially define the tangent that your Curve will follow by defining two extra locations:

Figure 4.20: Tangents in Blender

The red lines you see in this diagram are handles. Let’s start explaining the node now.

The Start vector value defines the beginning position of your Bezier segment. The Start Handle vector defines where your handle (the red line) should begin. Logically, the End Handle vector defines where the handle should end.

Finally, the End value defines the end position of your curve.

The difference between the modes is that the Position mode makes sure that the Start and End handles are in a fixed position.

On the other hand, if we use the Offset option, the Start and End handles will be defined by offsetting them from the start and end of the Curve.

This node will define the shape of a star with various levels of control:

Figure 4.21: Star node primitive

Here are the various input values for it:

  • Points: This will control the number of points your star contains. This will also define how many vertices your curve will contain. If we double the Points value, we get the vertex count of the star curve.
  • Inner Radius: This defines how thin your star is. You can imagine this as an inner circle inside of your star.
  • Outer Radius: This defines how long the spikes of your star should be.
  • Twist: This value will twist the inner part of your star, creating a twisting effect:

Figure 4.22: Star twisting

Finally, let’s move on to the Spiral node primitive.

The Spiral node primitive will define a spiral shape with a curve:

Figure 4.23: Spiral node primitive

This node can be useful when you want to align objects in a spiral shape. So, without further ado, let us get right into teaching you all about this node:

  • Resolution: This integer value defines the number of vertices the spiral curve should contain. The amount reflects the number of vertices each layer should have.
  • Rotations: This value will rotate the spiral x number of times before it reaches the Height value.
  • Start Radius: This defines the radius that the spiral will follow at the beginning of the spiral.
  • End Radius: This logically defines the radius that the spiral will follow when it nears the end.
  • Height: This defines the height of the spiral; as stated before, the rotations will define the max rotations fitted in the given height.
  • Reverse: This Boolean value defines whether the curve should be mirrored or not.

To wrap things up, we will teach you how to combine two primitives using a Join Geometry node. This will be your first Geometry Nodes project.

Exercise – your first Geometry Nodes project

Section titled “Exercise – your first Geometry Nodes project”

Let’s start by creating your first simple Geometry Nodes project; we will be combining two node primitives:

  1. Let us first start by thinking about what nodes we will need. If we want to combine a plane and a cube together, we will need three nodes:
    • Cube
      • Grid
      • Join Geometry

We will need Join Geometry to combine the two objects.

  1. Let us add a Geometry Nodes workspace to the default cube (or any other object; we won’t be using the mesh itself), and let’s open the Geometry Nodes editor:

Figure 4.24: Geometry Nodes editor

  1. We will not need the Group Input node since we will just use primitives, so you can go ahead and delete the Group Input node.
  2. Let us start by adding the Cube node to our Geometry Nodes editor. Start by pressing Add at the top of your Geometry Nodes workspace, hovering your mouse over the Mesh tab, and then hovering over the Primitives tab.
  3. After that, click on Cube. This will add the Cube node to your Geometry Node editor.
  4. Let us repeat this step for Grid. After that, your Geometry Node editor should look something like this:

Figure 4.25: Primitives

You will not see anything appear in the Viewport; this is normal and is because Group Output is still empty.

  1. Try connecting the Mesh output of Grid to Group Output. Once you’ve done so, you will see that the grid (plane) will appear in the Viewport.
  2. We cannot directly combine the cube and the grid; to combine them, we will need a Join Geometry node. This will allow us to join two geometry outputs together. Let us disconnect the Grid node and add the Join Geometry node. This node can be found when pressing Add | Geometry | Join Geometry, as seen in Figure 4.26:

Figure 4.26: Adding a Join Geometry node

This is how your Geometry Node editor should look right now.

Figure 4.27: Join Geometry Node

  1. Now it is time to connect these nodes. Let us start by connecting the cube output to the Join Geometry input socket. This can be done by left-clicking the Mesh output of the cube and sliding it to the Geometry input of the Join Geometry node.
  2. Since the Join Geometry node contains a multi-connection node socket, we can connect multiple node connections to the same socket. Let us now connect the Grid node to the socket as well. Your node tree should now look something like this:

Figure 4.28: Connecting the primitives to the Join Geometry node

  1. All that is left to do now is to connect the output of the Join Geometry node to the Group Output node. This will ensure we’ll be able to visualize the result in the Viewport:

Figure 4.29: Connecting the Join Geometry node to Group Output

  1. Looking at the Viewport, we can see that only the cube appears to be visible; in reality, the grid (plane) is covered up by the cube since they are the same size. Let us fix that by increasing the Size X and Size Y values of the grid to 2 on each axis:

Figure 4.30: Increasing the size of the grid

That is it! Your first Geometry Nodes project is complete!

This brings us to the end of this chapter. We’ve successfully combined two node primitives together.

In this chapter, you learned how to use the various Mesh node and Curve node primitives. We also showed you how to combine two primitive objects together using the Join Geometry node.

Now that you know about the node primitives, you can move on to the next chapter. In the next chapter, you will learn how to distribute points onto a plane to start instancing objects or primitives onto a mesh.