Text Transition with Font SOP or MOPs Typography

   1506   3   1
User Avatar
Member
3 posts
Joined: 10月 2013
Offline
Hello,

I've played around with Cavalry2D(https://cavalry.scenegroup.co) and one thing I like there is the "Transition String Maniplulator". This lets you shift the characters of a text into different characters. So you can transition from one text into another by switching the words letter by letter. You can control this effect with a slider.
This feature is available in the free version of cavalry too, but If you want to use advanced features (dynamics, etc.) to enhance the text animation you have to pay.
Since I already have a Houdini Indie License and anyways wanted to learn to script, I thought it would be great, if I could achieve the same Transition-Effect in Houdini. So I could save the money for the pro-License of Cavalry2D and also would dive deeper into Houdini.

Does anyone have an idea, how I could achieve that? As far as I understand, it would require me to script in the text field of the Font SOP/Mops Typography. There I would have to display the result of a script which swaps the words of my text letter by letter. I think this would require me to handle with a string array, maybe in a seperate node created with python?
I'm not a total beginner in programming, meaning I've had a JAVA-Course during my studies. But I have never developed in my job. The basic concepts I'm more or less familiar with, like classes, methods and variables.

Just as I said, it would be great, if someone had a hint or knows a tutorial or maybe even a finished solution for my question.
Edited by ramorg - 2022年11月15日 16:06:07
User Avatar
Member
384 posts
Joined: 4月 2017
Offline
If you're talking about just swapping characters one at a time rather than using a morph, this is pretty straightforward. Just create both of your text layouts as separate SOP streams and then replace letters one at a time based on an attribute... if you're already using MOPs Typography you could just use a Shape Falloff, or any other way you want to mask a group. Blast the characters in that group in one stream, and blast the opposite group in the other stream, then merge.

Attaching an example. This uses MOPs Typography to create the letterforms, but you could do this with the Font SOP too... just pack each individual letter (Assemble SOP using "textindex" as the Piece Attribute works well) and it'll work the same way.

Attachments:
mops_typography_swap.hip (1.1 MB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
3 posts
Joined: 10月 2013
Offline
Hello toadstorm,

wow, thanks for your reply and for the example file.. It works the way it is made in cavalry.
I also have another question. Maybe you have an advice here, too.
In cavalry there is another effect in the String Manipulator which I like very much. It is Text Shuffle meaning the order of the letters in a word is mixed up. As far as I understand Houdini that would simply mean to rearrange the Px and rest0 and rest1 values of the letters of a Font or MOPS Typography, without touching the rest.
I still didn't find a way to edit the data I see in the spreadsheet to achieve that. I've tried several nodes like sort, transform pieces, attribute nodes and so on in combination. I partially went into the right direction but I'm still not where I'd like to be.
Don't know, maybe I'm simply confused by the different attributes.
Do you have a hint here, too?

Greetings
Edited by ramorg - 2022年11月16日 09:54:11
User Avatar
Member
384 posts
Joined: 4月 2017
Offline
I'm attaching another example for you. In this case I'm using the Sort SOP to scramble the point order of the letters, then regenerating an id attribute to match that new point order (this is because MOPs prioritizes point ID over point number when matching objects), and then using MOPs Apply Attributes to copy the transforms of the resorted points to the original points. The only downside is that this won't update kerning, so you'll only get consistent spacing if you're using a monospace font.

Attachments:
mops_scramble_letters.hip (219.1 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
  • Quick Links