How to scatter Font SOPs each having procedural text content

   461   5   0
User Avatar
Member
37 posts
Joined: May 2016
Offline
I want to create a scatter to points with variants of a Font SOP where each of the copies is a unique number.

Is there a way for a Font SOP to read an attribute on the scattered points and use this as its text content?

Easy to create the random number attribute but can't figure out how to apply that to the copied Font Objects. Its upstream of the copy to points node and has no input so can't figure this out even with some sort of For Each loop.

I could brute force it and make a large number of Font SOPs but that's a last resort and difficult to direct.
User Avatar
Member
28 posts
Joined: July 2022
Online
grid1, scatter1 is default
aw1 is picture1
visualize is unnecessary
foreach node is for point node, default
aw 2 is picture2
copytopoint1 is default
font1 is picture2
color1 is unnecessary

Attachments:
PixPin_2024-03-29_18-26-30.png (565.2 KB)
PixPin_2024-03-29_18-30-39.png (779.1 KB)

User Avatar
Member
37 posts
Joined: May 2016
Offline
Aha... I forgot about spare inputs (-1)! Thanks, that'll work.

Could I create a random number in the wrangle, and use metadata node as seed so it creates a random number as the text string on each loop?
User Avatar
Member
28 posts
Joined: July 2022
Online
Yes, you can do it
And you can combine these methods to do more things

Attachments:
PixPin_2024-03-29_21-01-42.png (722.5 KB)

User Avatar
Member
28 posts
Joined: July 2022
Online
use "sprintf" instead of "itoa"
if you want to convert float to string

Attachments:
PixPin_2024-03-29_21-13-27.png (495.0 KB)

User Avatar
Member
37 posts
Joined: May 2016
Offline
Nice, thanks!
  • Quick Links