Expression for underlining words in a text row?

Moderators: Disciple, zlovatt

Post Reply
NEO_AMiGA
Posts: 20
Joined: September 4th, 2008, 5:55 am

Hey again guys.

Would need some smart way to automatic create an underline under each word in a row of text. I must be able to set the height of the underline and the distance from the above text line. Preferably also some "bleed"-control so i can make each section of the underline #-pixels wider then the word.

My brain is currently not working and I can not come up with a smart way to do it. Preferably as straightforward as possible and without precomps and it must be automatic so it's based on the actual text I type in.

We're doing a Karaoke based tv-show and there's shitload of text to type and animate. I have written loads of expressions and streamlined the workflow pretty good. But we still have to mask every word for getting the underline in a nice way. Would like to automate this to. Attaching a screen so you know what it looks like now.

I was thinking if there maybe was a pixel analyze command or something then I could query each vertical pixel row from bottom to top (or in a user defined area) on the text layer. As soon as I hit a pixel I somehow store that and paint it out on another layer on a user specified Y-position. Then I do that for each row and I would get a underline for each character. Then I still need to stitch it together so it underlines each word and not each character. Sounds a bit complicated. Maybe there's some better way? =) Would be a huge timesaver for me if I could automate this.
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

Expressions cannot modify text display properties or generate pixels - plain and simple. And I don't think your attempts at throwing sampleImage() in the pot really have any value beyond what you could do with text animators, which IMO is the solution you should look into. After all, they can be made to operate on words or whole lines of text, do they not? ;-) I don't see why you cannot simply add a second line of text with underscores and either animate it directly, linked to your main text, or use it as a matte on whatever underline you require...

Mylenium
[Pour Mylène, ange sur terre]
kobyg
Posts: 128
Joined: December 7th, 2007, 10:11 am

Check out Paul's SSA Karaoke Animator script in this forum:
viewtopic.php?f=9&t=380
Maybe it could help you.
NEO_AMiGA
Posts: 20
Joined: September 4th, 2008, 5:55 am

Mylenium wrote:Expressions cannot modify text display properties or generate pixels - plain and simple. And I don't think your attempts at throwing sampleImage() in the pot really have any value beyond what you could do with text animators, which IMO is the solution you should look into. After all, they can be made to operate on words or whole lines of text, do they not? ;-) I don't see why you cannot simply add a second line of text with underscores and either animate it directly, linked to your main text, or use it as a matte on whatever underline you require...

Mylenium
Underscores have one fixed size. They don't change in length whether it's replacing an "i" or an "m". And even if I modified the font so I had a font with underscores for all the letters I would have to make them a bit wider to compensate for kerning/trackin between the letters. Which would lead to the underscores being to long on the left and right of the word.
I thought textanimators was the way to. But haven't come up with something workable so far.
kobyg wrote:Check out Paul's SSA Karaoke Animator script in this forum:
viewtopic.php?f=9&t=380
Maybe it could help you.
That's interesting. Will take a look at that and see if there's some underline option that can be replicated.
Post Reply