3
$\begingroup$

Using geometry nodes, I'm trying to take a string, create a tile for each letter in the string and put one letter on each tile. The Marquee Tile group here works when I pass in a letter directly, but I can't seem to get the string to slice with the instance index (note the red noodle top middle-ish). My problem seems to focus on the three top-most nodes (Index, Slice String, and the Marquee Tile group). I'll also post a shot of the Marquee Tile group too, but it appears to be working as is.

What I've tried:

  • on a similar question someone suggested also attaching the index node to the Instance Index of the Instance on Points node, the noodle was still red
  • I tried storing a named attribute for the index just after the Instance on Points node, but the Named Attribute node still issued a red noodle to the slice string

Not sure where to go from here. Would love to know what I'm doing wrong and how to get this working. Thank you!

enter image description here

enter image description here


@quellenform — That was just the ticket. I actually had tried a similar approach earlier but couldn't manage to get the letters centered. Your solution is brilliant. Thanks. Sorry I didn't post a results shot. But here it is with your solution applied. Just a little marquee action there. Thank you!

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Hello and welcome to Blender.SE! Note that you are using a node here that does not handle fields. More information can be found here: blender.stackexchange.com/questions/274557/… $\endgroup$
    – quellenform
    Commented Jul 4, 2023 at 20:46
  • $\begingroup$ Thanks for the thorough article. Definitely helps understand the why. Something I still need help with is how to fix this particular use case. The article said some nodes transform depending on the input you give them but the index node has no inputs. Is there anything I can do to convert the output? I keep wishing I could just write a for each loop and feed it the integers one by one… Anyway, my understanding has been enlarged, but I’m still not quite at a resolution. Any more ideas? $\endgroup$
    – gandrewb
    Commented Jul 4, 2023 at 23:41

1 Answer 1

2
$\begingroup$

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+)

$\endgroup$
2
  • $\begingroup$ Thank you! That's just what I needed. $\endgroup$
    – gandrewb
    Commented Jul 6, 2023 at 3:59
  • $\begingroup$ @gandrewb You're welcome! I'm glad this is working for you. $\endgroup$
    – quellenform
    Commented Jul 6, 2023 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .