• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Row of text animation (y position gap for underlying layers) expression

Explorer ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Hi guys

So I´m creating cooking videos and want to present ingredients through animation (simple position x animation). Each ingredient on its own row. Animation of each row to start slightly after the previous one.

The animation will be saved as an Essential Graphics animation in my library for reuse in PP. The number of ingredients will vary of course. And, the gap between the rows could vary depending on the total amount of ingredients on each recipe and the font size chosen for each recipe.

That´s the background sort of. Anyone with an expression tip on foremost the y positioning?

Thanks!

Views

2.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , May 29, 2017 May 29, 2017

Hey Jakob, yes that whole expression goes in the position of each text layer.

Please note that this is set up to have your layers arranged with your text layers grouped together top down, with your control layer "Null" just above. This gives them their order in the group and the null tells your first text layer that it is the first in the bullet list.

Make sure you add the sliders and name them as I had specified in my first post.

- Eric

Votes

Translate

Translate
LEGEND ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Why expressions? That makes totally no sense. You would simply apply text animators or put the stuff in a pre-comp for easy editing or both or a million otehr techniques involving effects such as transform and Motion Tile. It might be worth rethinking your approach rather than on looking for solutions that likely won't work in Premiere, anyway. You can't even change the font, so pardon me, but it seems you haven't thought this through correctly.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Hi and thanks for your response!

For the animation itself there's no need for expressions. But I would think that for the y positioning of each row, an expression would be appropriat, to control the gaps between rows to accommodate for various font sizes. And maybe to to control the start of each row animation.

And regarding font; i will use the same font every time.

Maybe be you're right of course, I'm a bit of a noob in AE. But to avoid to manually change text size and row gap for each layer - that's why I thought expressions was the way to go. Are you with me? 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

I agree with Mylenium. It would appear you've chosen a workflow based more on Adobe marketing propaganda than on knowledge of what will work best for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Hi Dave

Same thought after my response to Mylenium?

Let me describe the thought out workflow.

- I would create ten rows of dummy ingredients as a template

- After creation of the template in AE I'd import it in my library as an essential graphic

- in PP I would use as many rows that I would need, let's say three, and leave the rest blank.

For recipe X:

- 3 ingredients. Very few, why the text size can be quite big. But the row gap would have to adjust according to size (or rather, the distance from the row/layer above)

- Leave the rest of the seven rows blank.

For recipe Y:

- 7 ingredients. A bit mire of them this time. The font size cant be as big as the last example but the gap would have to be good and coherent.

- leave the rest blank.

Again, maybe I'm overthinking this. Or? 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

If you're looking for a way to evenly distribute the position of the layers based on how many there are... yes, it can be done with expressions, but if you're new to AE, it'll likely be more trouble than it's worth for you.

Does each line use the same animation to come onscreen? If so, it might make sense to just make your template for a single line of text, and then you can iterate that in PP for each ingredient. You'll have to manually adjust the Y position in PP for each line, but this will also give you flexibility. Thinking about timing, you'd likely need this kind of flexibility anyway, since some ingredients will take longer to say than others, etc.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Hi Kyle

Thanks for your response!

Yeap, you might be on to something there. It would be much easier really, to do it like you suggest. For, the animations are indeed the same for each row.

BUT, I have two problems with that:

– I wouldn´t have the same swift bam-bam-bam-ready-solution, if you know what I mean? It would feel soooo good to just have anims ready to go and just fill in the ingredients.

– I would need the ingredient list to animate out at the same time. Maybe your solution would be to nest the list and animate out then?

Btw, I was inspired to find this solution after having used a "fake-3d-thickness-on-z-axis" expression and thought maybe I could use the same logic here, i.e. to have the y position of each row be the same value as the one above, plus "x" pixels/percent/or whatever. What do you say – do you hang on to your initial tip? 🙂

The expression was:

[value[0],value[1],index*5]

// Jakob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

LATEST

UPDATE: Turns out when thinking about it; what I did was to create a template in AE with nine possible ingredients (deleting the ones I don´t need for any given example), animated them with keyframes and manually placed them in the com, and then exported as a template for use in PP. Ergo, I might have overthought this one... 🙂 Anyways, thanks again, and here´s the actual result: Så gör du glass i glassmaskin | Arla Köket - YouTube .

// Jakob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

I think you need to think about the total audio-video presentation, that's what I think.  It doesn't sound like you have a firm grasp yet on how you're going to pull it off.

Just for the heck of it, here's an ingredient list for Beef Braggiole, something I plan to make soon just 'cause I like it:

  1. Beef
  2. Home-made bread crumbs
  3. Eggs
  4. Onion
  5. Garlic
  6. Parsley
  7. Salt
  8. Pepper
  9. Red cooking wine
  10. Salt pork
  11. Grated Romano
  12. Basil
  13. Oregano

That's thirteen ingredients, just off the top of my head.  I forgot to list the Pancetta.  Now, that's just for the Braggiole.  Not to mention the Marinara sauce.  No quantities listed.  No ancillary items like butcher's twine listed.  AND NO TECHNIQUES DESCRIBED.

What's happening on the audio?   Do you plan to do it all-voiceover?  Do you plan to have an on-camera presenter showing the proper techniques?  Do you intend to give the viewer time to write down the ingredient list and take notes on technique?  Do you plan to add supplemental graphics such as, "Finely Chop 4 Sprigs Italian Parsley" as the chopping takes place on screen?

Or is this just an ingredient list so far?

If you ask me, I think you need a more comprehensive plan before you start worrying about using expressions in After Effects.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 18, 2017 May 18, 2017

Copy link to clipboard

Copied

Dave

I think you misinterpret my lack of knowledge of AE expressions with a general lack of knowledge/experience in video production. Don´t worry about that; I´m quite good at what I do in regards to video production.

Jakob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2017 May 18, 2017

Copy link to clipboard

Copied

Don't take too much offense, that's kind of how Dave responds to everything, it seems.

Obviously, take this all with a grain of salt, since you're the one handling your specific issue. From the info I have, I'd probably go with my solution of using one line of the text animation and iterating. You could either nest and do your move-out in PP, as you suggested, or you could also just build the move-out into the original animation, and just trim the layers accordingly on your PP timeline:
- In AE, let's say you do a 12-frame move in, then let the layer be static for 4 seconds, then do a 12-frame move out.
    (Bonus points for using comp markers to make your life a little easier in the next step.)
- In PP, just line up the layers as you want them to move in, then split your layers while they're static. Move the out points so they all line up, and either trim or fill (with that static middle part) so the layers sit still for the appropriate amount of time.

Whether you do it all in AE or split between AE/PP, you'll probably take a little time manually setting up the list for 5 ingredients, the list for 6, 7, etc., but after that you can simply swap words for any future instances of 5-ingredient recipes.

I've got the expression for the layer distribution, should you desire to go that route. I'm digging it up and confirming. (I've found that writing code from scratch while still working on my coffee is not the best idea...)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2017 May 18, 2017

Copy link to clipboard

Copied

So, this particular expression, if applied to position, will evenly distribute in Y based on how many layers are in the comp. Total layers, though, so this is kind of the most basic version of this. I don't think it's actually the best solution here, but might be a good thing to keep in your arsenal for the future.

x = value[0];

y = thisComp.height/(thisComp.numLayers/index);

[x,y]


Imagining we were using this... I would probably start by separating the dimensions, so you can keep your X movements clean and not have to mess with that portion of it. You don't actually want comp height, because for text that'd throw you way out of title safe, so we'd have to figure out the safe area for text, and constrain that value. If you have other layers in your comp (which seems likely?) then you have to start constraining THAT. Also, this even distribution may be mathematically pleasing, but it's probably not going to be visually appropriate. You can see how this is getting complicated pretty quickly. It's certainly workable, but I think it's probably an unnecessarily long road for this problem.

I have a feeling that anything auto-calculating the positions is going to end up being visually unsatisfying. While using index is certainly a good start here (and very well may contain some workable solutions), that kind of gets tricky too, and the font size isn't actually accessible via expressions, fwiw. (You could access the layer Scale, though.) I have a feeling you'd spend so long trying to figure out the right math to have one offset that calculates properly across all the potential ingredient lists, it again becomes more trouble than it's worth, unless you're going to be using this setup, like, every day.

So. If you don't like my above solution, here's another along the same lines.
Make a 5-ingredient list completely in AE. It's certainly easier to copy/paste keyframes, line layers up, etc.
Then make a 6-ingredient list. 7. 8. So on.

In PP, simply grab the list that corresponds to the number of ingredients you need. If gets you where you need to go, without a bunch of messy math, and you can make sure each list looks good for the amount of text filling the screen. Since you've basically just futzing with the Y-position (I'd separate those dimensions for this solution as well!), on what's otherwise the same layer, it really shouldn't take too long. (I guess you might be adjusting scale/font size on the longer lists? But you could do it on all the layers at once.) This may or may not be more efficient than the above solution, depending on your specifics.

Another possible helpful idea, if building all in AE - Drop a Null in an appropriate spot (maybe top left corner of your usable text area?) so you can easily size the whole text block. That'll be cleaner than scaling the layers individually, as you'd likely have to adjust positions after resizing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2017 May 18, 2017

Copy link to clipboard

Copied

Orrrr try Eric's solution, posted while I was writing my novel of mostly useless info. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 20, 2017 May 20, 2017

Copy link to clipboard

Copied

Hi again Kyle

i truly and really appreciate your help and support with dealing with grumpy old men... Ill check your suggestion also! Keep you posted!

jakob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 18, 2017 May 18, 2017

Copy link to clipboard

Copied

Hey Jakob, based on your description you may want something like this.

Create a Null Object and name it "Control", place it right above your list of text layers.

Add two sliders, name one "Group Y" and the other "Spread"

A=thisLayer.transform.position;                                                               // This layer's base position //

try {B=thisComp.layer(index-1).position;} catch (err) {}                           // Try to assign layer above's position to B variable //

try {C=thisComp.layer(index-1).text.sourceText;} catch (err) {C=false}  // Check to see if layer above is a text layer //

GroupY=thisComp.layer("Control").effect("Group Y")("Slider");             // Get value of "Group Y" Slider //

Spread=thisComp.layer("Control").effect("Spread")("Slider");               // Get value of "Spread" Slider //

if (C!=false) [A[0], B[1]+Spread] else [A[0], GroupY]                               // If the layer above is a text layer, spread, if not reference group Y//

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 20, 2017 May 20, 2017

Copy link to clipboard

Copied

Hi ericsten

Thanks a lot for this! I sure will look in to this! I'll update here with how it goes. I just have to attend to another project that sudddenly got assigned to me, first.

jakob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 29, 2017 May 29, 2017

Copy link to clipboard

Copied

Hi Ericsten!

I´m back on it now. However, I don´t quite get where to put the expression? Is it on the position property of each text layer?

Jakob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 29, 2017 May 29, 2017

Copy link to clipboard

Copied

Hey Jakob, yes that whole expression goes in the position of each text layer.

Please note that this is set up to have your layers arranged with your text layers grouped together top down, with your control layer "Null" just above. This gives them their order in the group and the null tells your first text layer that it is the first in the bullet list.

Make sure you add the sliders and name them as I had specified in my first post.

- Eric

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines