Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Text highlight (expression selector)

  • Text highlight (expression selector)

  • Yoan Boisjoli

    February 20, 2021 at 1:24 pm

    Hey folks!

    Anyone have a clue on how to have custom highlighted text like in the image attached. I played with the smart highlighter preset by Ukramedia (link below) but it only add a fill colour.

    I’m creating a MOGRT for a client and he wants to be able to highlight some words within a whole sentence.

    I’m thinking about isolating a word and maybe using sourceRectAtTime() but then that would mean I would be using a shape layer and since I don’t know how many words will end up being selected, I can’t really use a shape layer.

    My next clue is using a font thats square shaped (dingbat or something) and having anothe text layer replacing the font of the selected words.

    I’d appreciate the help since I’m a bit confused!

    Thanks in advance everyone!

    Link to preset:

    Smart Highlighter – Ae Preset

  • Yoan Boisjoli

    February 20, 2021 at 6:20 pm

    Here’s the link to the reference image:

    https://www.computerhope.com/issues/pictures/highlight.jpg

  • Filip Vandueren

    February 20, 2021 at 7:19 pm

    The two approaches you mention are exactly how I would tackle it.

    Funny enough I was working on a version today.

    I posted a simple implementation a while ago that could highlight 1 word using a mask, here it is again if you like. it uses the solid composite effect with an effects mask, so you can do layer transfer modes, which enable you to do stuff like inveriting text etc.

  • Yoan Boisjoli

    February 20, 2021 at 9:49 pm

    Hi Filip!

    Thanks for replying! Your method is very clever! However, in my case, I need to be able to isolate more than a word.

    I managed to make something (see file attached) where a second text layer calculates how many characters there are in the top text layer (excluding punctuation and spaces) and replaces the letter for “N” with a super heavy stroke on it so it appears like squares.

    Now my next step is to rig the same set up as in the smart highlighter preset to be able to put some words in between a set of characters (i.e.: The word [color] is now in square brackets so it would be highlighted.”

    The only potential issue is that some letter are thinner than the letter “N”. Like if you have a sentence with many letters “I” the highlighted part might look a bit longer.

    Let me know if this makes sense to you !

    Thanks and have a good day !

  • Filip Vandueren

    February 21, 2021 at 1:58 pm

    Working on it. Nearly there 🙂

    A solution with a second layer that renders and positions the block characters is working, but renders slowly because of many expression selectors.

    So I’m better off creating an algorithm that draws multiple boxes connected with an invisible hairline inside 1 mask, based on the one I already had.

    I’ll probably dinsdags it tonight.

  • Yoan Boisjoli

    February 21, 2021 at 5:59 pm

    Oh yeah multiple boxes sounds interesting! In my case I’m trying to have a way of writing words within brackets and automatically having these words being highlighted. I’m afraid the person using the mogrt might be confused with the index numbers to control the selection area.

    I’ll keep working on it and you keep working on yours hehe maybe we can compare our work 😛

    oh by the way not sure I understood 100% when you wrote “I’ll probably dinsdags it tonight.”

    I think dutch autocorrect got you and confused “keep working on” with “tuesdays” hahaha am I right?

  • Filip Vandueren

    February 21, 2021 at 8:54 pm

    yep, “finish it tonight” 🙂

    Here’s my work, still pretty slow calculation, but drawing the complex mask was even slower. Check it out:

    https://imgur.com/Cy5JaL5

    BTW: the highlight layer needs the adobe font “Source Serif Pro”, because every font (that includes it) has a slightly different ■ (Black Square) character design.

    Source Serif Pro’s is exactly 60 x 60 px at 100pt fontsize, which is used as a constant in the position and scale calculations

    View post on imgur.com

    View post on imgur.com

  • Yoan Boisjoli

    February 21, 2021 at 9:10 pm

    Wow it looks amazing! Good job Filip!

    Can’t wait to open the file as soon as I get home! 😛

  • Yoan Boisjoli

    February 22, 2021 at 3:44 pm

    FILIP ! This is amazing !!

    How did you create this? Man I think it would’ve taken me ages to to come up with that solution!

    The bad solution I was getting to experiment with was duplicating the text layer and have the effect shift channels to “full on” which made squares under the text thus respecting the characters width.

    What is calculations? That’s the only thing I can’t get me head around!

    I’m still flabbergasted haha wow 🤯

  • Filip Vandueren

    February 23, 2021 at 3:40 pm

    Thanks Yoan 🙂

    I use calculations here to copy some pixels from another layer to this layer and combine it with the alpha.

    That way we get the words of the text layer, but matted by the alpha of the marker.

    Then we colorize and finally, using cc blend, the original pixels of the layer (again, the marker lines) are composited under the words.

    It’s a way to do compositing using effects rather than with extra layers. Usually you have to take care that the layers are of equal size, but because we are operating on continuously rasterized text-layers every layer is interpreted as composition sized.

Viewing 1 - 10 of 13 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy