# Why is there a red line when I try to connect one node to another?

I'm trying to connect one node to another here, and I get a red line: I just can't figure out why and what this is.

What I have tried so far to solve the problem:

• I made myself a cup of coffee
• I turned off the computer and turned it on again
• I have tried a different color theme that displays the lines with a different color

...no solutions have helped me though.

So the question is:

How can I avoid that red line here and what is the deal with these different sockets?

Note: This question (and answer) serves as a target for the recurring question regarding connection problems of nodes, which is asked again and again in various forms, and is intended to show as simply and clearly as possible how it should be done.

A diamond shape does not fit into a round, and a round shape does not fit into a diamond shape.

## But why is that?

Short answer: Because one data type is a single value, and the other is "Fields".

The official documentation of Blender states:

"Fundamentally, a field is a function: a set of instructions that can transform an arbitrary number of inputs into a single output. A field’s result can then be calculated many times with different input data. They are used all over geometry nodes to allow calculations that have different results for every element (mesh vertices, faces, etc.)."

This is technically perfectly correct, and should leave no questions unanswered, only apparently it is less easy to understand for many users with less technical background.

Therefore, I will try a simpler explanation...

## Simply explained

Let's take a cube as an example: This cube has exactly one position, exactly one rotation, and exactly one scale.

This cube is handled in Geometry Nodes simply as "Geometry", because the Geometry Nodes don't care if you use a cube, Suzanne, or a Death Star.

These properties can be easily edited in Geometry Nodes with the node Transform: Translate the geometry with Transform

So a Geometry has transformation properties, which can be described with a value and this single value for a certain property is represented with a round socket: But what if we don't want to change the position, rotation or scaling of the cube, but the points it consists of?

Suddenly we have for this geometry not only one value for the position, but 8!

And if we want to move the positions of the edges of the cube, we would have to process 12 positions, because a cube has 12 edges!

And that's where "Fields" come into play!

These describe several values of a certain domain (Point, Edge, Face, Face Corner, Spline, Instance) of a geometry and are called Attributes. The domains for points, edges, faces, etc. are therefore called Attribute Domains.

You've probably read this countless times somewhere: An attribute is just such a data package, which describes some property of a certain part of a geometry, and in this example therefore also refers to several elements, because a cube consists of 8 points.

In this case it is therefore the Attribute Domain "Points", and per point there is a value of type "Vector" which describes its position.

So we have 8 vectors in this Attribute Domain, and not just one single vector. And exactly this fact, that we are dealing here with the processing of several values of a certain domain of a geometry, is symbolized with a diamond-shaped socket: To move the positions of the points of a cube, the node Transform can therefore not help.

Instead, the node Set Position is used, because it can move individual elements of the attribute domain Point: Reposition individual points with Set Position

## Let's increase the level of difficulty

Some nodes, however, can process both types of information! These simply switch automatically the current mode, depending on which kind of information they receive.

So the circle fits into the diamond after all!?

Yes: If the node is able to do this, it is represented by a diamond-shaped socket with a dot in the middle: To be precise: If a diamond-shaped socket with a dot in the center does not receive a field as input, a single value is always used instead. Here is the exact description: Field Visualization

A simple example of this is the node Set Position, which in the following image takes a single value at the input Offset and applies it equally to all points: Offset individual points with Set Position and a single value

A frequent application in this context is the use of Set Position in combination with randomly generated values by the Random Value node.

In the default setting, this node always provides a field, in order to be able to assign a different value to each point, for example: Offset individual points with Set Position and a field as value

## Switching the Mode?

However, some nodes can be switched manually by providing them with a certain value at a certain input. This includes, for example, the node Random Value.

Exactly this use case often leads to the following error: Here the node Random Value returns a field, but the node Transform expects a single value

By inserting a single integer value into the input ID of the node Random Value, the node automatically switches to generating a single value and delivers it to the node Transform: Manually switch the mode from field to a single value

As you can see, in this use case, the representation of all sockets changes from diamond-shaped to circular, and the red line disappears.

• A fantastically worded answer, and one that really helped me. Thanks! May 11 at 11:12
• @JohnScolaro You're welcome! Thank you for the praise! May 11 at 11:13
• This answer appears to be out of date. Although the same solution still works in 4.0 beta, the sockets no longer change shape from diamond to circle when you plug the value node in, so the initial mantra of "a diamond shape does not fit into a round, and a round shape does not fit into a diamond shape" is no longer correct. (I don't know if this is intentional or if it's a bug in 4.0.) Oct 13 at 9:31
• @N.Virgo Thanks for the feedback! Let's see what happens once 4.0 is stable and released. Oct 13 at 11:40