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

AE If & Expression writing help needed

Explorer ,
Jul 29, 2024 Jul 29, 2024

I wonder if I could pick some expert brains here, as I am coming up blank on searches and youtube videos. Its about Expressions within After Effects

The scenario.

I am trying to automate some penalty graphics – so there could be 3 styles – Not taken, Missed or Scored, and I have 3 graphics for each option.

I want to use Checkboxes (as cant find another way of comparing text fields). Checkbox will be ‘HomeFirst’ (so the pc knows where to put individual penalties, and then about 30 ‘Pen Scored’ checkbox, each representing a Penalty Kick (the HomeFirst checkbox will allow us to decide if Pens 1,3,5 etc are for the home team or away team).

So I thought I could use an expression as follows

(for Pen 1 graphic on home side)

If HomeFirst = 1 AND Pen1 = 1 then Opacity 100% on HomePen1Score Graphic

If HomeFirst = 1 AND Pen1 = 0 then Opacity 100% on HomePen1Miss Graphic

That would mean if HomeFirst was 0, then Pen1 would be blank (ie not yet taken)

If HomeFirst = 0 AND Pen1 = 1 then Opacity 100% on AwayPen1Score Graphic

If HomeFirst = 0 AND Pen1 = 0 then Opacity 100% on AwayPen1Miss Graphic

That would mean if HomeFirst was 1, then AwayPen1 would be blank (ie not yet taken)

 

Each Composition will have 10 graphic locations (5 home & 5 away) sets of 3 graphics at each location, dictate by the rules above

I would also have individual compositions for each pen (as need to produce a different graphic after each penalty taken)

But I cant seem to write an AE expression that calls the checkbox (will be in another composition)

Any suggestions on what the expression would look like?

 

 

TOPICS
Expressions , How to , Scripting
190
Translate
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
New Here ,
Jul 29, 2024 Jul 29, 2024

Achieving dynamic penalty graphics in After Effects requires complex expression logic. Using checkboxes to control graphic visibility is challenging due to limitations in accessing data between compositions. Potential solutions include creating a data layer composition, utilizing external data sources, or custom scripting. Each approach has its pros and cons, and the best choice depends on project complexity and your scripting abilities.

Translate
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 ,
Jul 29, 2024 Jul 29, 2024
LATEST

All manner of text can be compared with string methods and RegEx. The rest is just a matter of  how to branch inside the conditionals and create loops plus likely one would use sliders rather than a gazillion text boxes and check if at any point a keyframe for the slider was created to register a penalty and what the slider value, e.g. representing the player's number was. It's all doable, just not the way you think it would be done. Of course @jason38868568aq16 's point is true - it would still be complicated and other methods might be more suitable and more flexible. Anyway, your convoluted explanation only makes my brain melt and doesn't give us any idea what the actual requirements for the graphics are like whether the penalties just count continuously or whether additional info like player names need to be included. You will need to be much more specific and provide a screenshot of your design and timeline layout before anyone even can think of cooking up even some basic expressions.

 

Mylenium

Translate
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