Skip to main content
Sample Index node was introduced in 3.4 (3.2 is using Transfer Attribute node) ... BTW great Answer as always :)
Source Link
vklidu
  • 37.2k
  • 1
  • 64
  • 143

As you have correctly noticed, the String to Curves node (and actually all other nodes that process strings) works only with single values instead of fields.

In this post the difference between these two data is explained in more detail:
Why is there a red line when I try to connect one node to another?

In your example you show exactly this problem: You are trying to feed a single value with a field value here, which is why the node Slice String is not able to provide the correct output.

Basically your idea is not wrong, but can be simplified or achieved differently with a little restructuring.

Since you unfortunately didn't share a screenshot showing the final result, I can only guess from your nodes what you want to achieve.

Therefore I assume that you want to center a letter over some objects.

You could solve this for example as follows:

enter image description here

Here I create a Mesh Line as a base, similar to your example.

At these points I instantiate the tiles.

Parallel to this I create the desired letters. These are processed as instances, so on the one hand I can rotate them to the desired orientation with Rotate Instances, and on the other hand I can move them to another position with Set Position.

In this case, however, we get the already known position of the previously created points with Sample Index, and move the letters there.

Since the letters can be of different widths, but we also have the Pivot Point of the node String to Curves available, we add these values in addition to the position to be able to align the letters in the center of the tiles.


(Blender 3.2+4+)

As you have correctly noticed, the String to Curves node (and actually all other nodes that process strings) works only with single values instead of fields.

In this post the difference between these two data is explained in more detail:
Why is there a red line when I try to connect one node to another?

In your example you show exactly this problem: You are trying to feed a single value with a field value here, which is why the node Slice String is not able to provide the correct output.

Basically your idea is not wrong, but can be simplified or achieved differently with a little restructuring.

Since you unfortunately didn't share a screenshot showing the final result, I can only guess from your nodes what you want to achieve.

Therefore I assume that you want to center a letter over some objects.

You could solve this for example as follows:

enter image description here

Here I create a Mesh Line as a base, similar to your example.

At these points I instantiate the tiles.

Parallel to this I create the desired letters. These are processed as instances, so on the one hand I can rotate them to the desired orientation with Rotate Instances, and on the other hand I can move them to another position with Set Position.

In this case, however, we get the already known position of the previously created points with Sample Index, and move the letters there.

Since the letters can be of different widths, but we also have the Pivot Point of the node String to Curves available, we add these values in addition to the position to be able to align the letters in the center of the tiles.


(Blender 3.2+)

As you have correctly noticed, the String to Curves node (and actually all other nodes that process strings) works only with single values instead of fields.

In this post the difference between these two data is explained in more detail:
Why is there a red line when I try to connect one node to another?

In your example you show exactly this problem: You are trying to feed a single value with a field value here, which is why the node Slice String is not able to provide the correct output.

Basically your idea is not wrong, but can be simplified or achieved differently with a little restructuring.

Since you unfortunately didn't share a screenshot showing the final result, I can only guess from your nodes what you want to achieve.

Therefore I assume that you want to center a letter over some objects.

You could solve this for example as follows:

enter image description here

Here I create a Mesh Line as a base, similar to your example.

At these points I instantiate the tiles.

Parallel to this I create the desired letters. These are processed as instances, so on the one hand I can rotate them to the desired orientation with Rotate Instances, and on the other hand I can move them to another position with Set Position.

In this case, however, we get the already known position of the previously created points with Sample Index, and move the letters there.

Since the letters can be of different widths, but we also have the Pivot Point of the node String to Curves available, we add these values in addition to the position to be able to align the letters in the center of the tiles.


(Blender 3.4+)

Source Link
quellenform
  • 39.5k
  • 10
  • 56
  • 149

As you have correctly noticed, the String to Curves node (and actually all other nodes that process strings) works only with single values instead of fields.

In this post the difference between these two data is explained in more detail:
Why is there a red line when I try to connect one node to another?

In your example you show exactly this problem: You are trying to feed a single value with a field value here, which is why the node Slice String is not able to provide the correct output.

Basically your idea is not wrong, but can be simplified or achieved differently with a little restructuring.

Since you unfortunately didn't share a screenshot showing the final result, I can only guess from your nodes what you want to achieve.

Therefore I assume that you want to center a letter over some objects.

You could solve this for example as follows:

enter image description here

Here I create a Mesh Line as a base, similar to your example.

At these points I instantiate the tiles.

Parallel to this I create the desired letters. These are processed as instances, so on the one hand I can rotate them to the desired orientation with Rotate Instances, and on the other hand I can move them to another position with Set Position.

In this case, however, we get the already known position of the previously created points with Sample Index, and move the letters there.

Since the letters can be of different widths, but we also have the Pivot Point of the node String to Curves available, we add these values in addition to the position to be able to align the letters in the center of the tiles.


(Blender 3.2+)