How do I target an effect to only specific parts of a text?

Hi all,
I hope you can help me. I have a basic setup where a text is shown based in a long table. Every so often, an LFO triggers a select node to display the next two lines in the table. I have created a network that generates a specific transition every time the words change. Now I would like to only target the changing letters, not the whole sentence. Is this possible? I’ve attached the TouchDesigner file.

Thank you so much in advance!

Stephan
For_TD_Help.1.toe (5.7 KB)

Hi @Stephanapets,

maybe if you set it up as a a/b switcher with 2 Text TOPs. This way you could use a Composite TOP to do a difference between the two and via thresholds and blurs perhaps create a mask for your transition effect.
Also the question: between the text “HELP ME” and “NEED HELP”, which letters do you consider as changing?

cheers
Markus

Hi Markus,

Thank you for your help! I tried it, but I think I need a more data oriented solution. So a network that can pinpoint which characters are different and a mask system that only targets those, like one of those clipboards you used to see at airports and train stations that would change only the digits that needed adjusting. Is it possible for TD to discern which characters change and which stay in the same position?
The texts “HELP ME” and “NEED HELP” were merely placeholders. In the final work, a sentence will slowly change letter by letter, so lets say this:

sentence 1: “HELP ME”
sentence 2: “HELP MY”
sentence 3: “HELP THY”

(silly example, but the changes will be gradual like this)

Hi @Stephanapets,

because you mention a Airport Flipchart, this gives you new possibilities:

  • all characters occupy the same space using a Monotype font
  • the position of each character can be calculated
  • we can use instancing as the basis of the system

For instancing you would use a 2D Texture array with all letters as the texture and this is also the key to checking which character changed:

First convert the string in a Text DAT with a Evaluate DAT into its decimal ASCII representation using the expression [ord(i) for i in me.inputCell.val] the result which you are now able to split into table cells with a Convert DAT.

This again you can convert into a CHOP with a channel per cell resulting in data you can combine with a Filter CHOP and Logic CHOP to obtain a proper indication which letter changed.

In the end I would create 2 renders: 1 for the text and one for instanced rectangles you can now use as a mask for the change effect.

Hope these ideas get you a bit further
cheers
Markus

You are the best Markus, thank you for all your help!
In the end, I have used your first suggestion and created a compare structure that feeds into a LumaBlur which works like a charm.