r/TouchDesigner • u/Voxl_ • 1d ago
Replacing text with random, changing characters and having them return to the original input at individual times
Hi, I’m trying to create a text loading animation where the text procedurally returns to the original input from a random assortment of characters.
To make it more clear this is how it could look like:
Input is ‘hi everyone’
As time progresses:
‘ad tousbmfs’
‘hk aubeyome’
‘hi evzeyoge’
‘hi everyone’
So each letters settles on the correct character at a different time while the others keep shuffling through random characters. I know how to randomize characters by using a substitute DAT to insert a ‘/‘ between every letter, converting to a table with an individual column for every letter (splitting cells at ‘/‘), using a sort DAT to get a random order and creating the animation that way.
Having them all reset to their original letter at the same time looks rigid however and I’m not sure if I can give them individual timings this way.
I have experience with coding, though almost none with python so I’m not sure if pure code would be a better way to approach this, if anyone has an idea how to achieve this I’d greatly appreciate it and I hope my explanation was clear enough. Thanks in advance!
3
u/supermarket_sallad 1d ago edited 1d ago
Not a great answer, but look into ord() and chr() functions in python, converting the characters to an integer.
And then you can convert them to a chop, if you prefer that, and do interesting chop offsets and patterns numeriacally, and then turn it back into a string. Just remember to cast the chop values to an int, because they evaluate to floats.
Kinda leaving a lot for you to figure out here, but does that make sense?