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

Carry over values from a slider that are timeremapped

New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

This is hard to explain, but simple in logic

 

I have 2 comps.

 

COMP A - "c01" - 60 Frames

  • I have an animation in "COMP A" with an abstract/pen drawn "shape" that grows over the span of 60 frames, from small to big
  • I have a separate rectangle shape that is keyframed to basically trace the bounds of the abstract shape (since there's no way to get the width of an abstract pen-tool shape)
  • I have a slider "SLIDER A" pickwhipped to rectangle shape width to keep track of the abstract width over these 60 frames

 

I precomped this into "COMP B" -- and time remapped it.

  • I added another slider "SLIDER B" to this comp, and pick-whipped it to the original slider (To get the live value of width). 
  • I've keyframed the time-remap varying from frames 0 thru 60 (growing and shrinking the shape).

 

The Problem:

EXAMPLE 1 (Successful) If I place this into essential graphics I will get a value that reflects its current time-remapped value

https://streamable.com/5q759q 

 

EXAMPLE 2 (Unsuccessful) If I don't place it in essential graphics, it keeps spitting out the original linear (non-timeremapped) value

https://streamable.com/t9fmjp 

 

Why does this work in essential graphics but not in standard AE comps?  I have literally sat here for 4 hours going in circles, and can't figure it out.

TOPICS
Error or problem , Expressions , How to , Scripting

Views

494

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
New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

** I should note, so the videos aren't confusing --- I have the keyframes for the time-remap on a control layer in a parent comp

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

sourceRectAtTime() works with all layer types, so I'm not sure why you would manually keyframe some rectangle just to retrieve the bounding box values. The rest is nothing out of the ordinary. By pick-whipping the property directly, you get the value pre time-remapping. that's how it is supposed to work and always has. The only reason Essential Graphics seemingly make it magically work is because it creates another container around the whole setup and rempas it all together. Still, it would fall apart regardless if more complex functions would be involved. Of course you can re-create the math by figuring in your time-remapping in whatever slider you have, but that's far from trivial, so ultimately your best bet would be to retrieve the value with sourceRectAtTime() or simply plot it visibly somewhere with a text layer.

 

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
New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Thank you for your reply!  I'm def an idiot -- I tried sourceRectAtTime before, but I didnt use it correctly -- and when I searched tutorials all it showed was "Making a rectangle behind text for lower 3rd"-type videos, so I just assumed it didnt work with custom paths -- I'm so glad you chimed in!

If you don't mind seeing the other reply to the Original Post -- you stated I could re-create the math and it'd be 'far from trivial' --- is there any recomendation of where to start?

For starters I changed my Precomp length from 60 frames to 100 frames to try and get a square number to figure out math in my head

 

This is ultimately what and why I'm trying to achieve.  I need the position of letter 2 to get the width of letter 1 so it "hugs" it. same for letter 3, and so on

 

2022-07-12_20-09-00.gif

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
New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

^ This is the essential graphics version

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

If you use the pick-whip to create an expressions like to retrieve a value from comp A in comp B, then it will retrieve the value from the current time. I.e. at frame 100 of comp B, it will retrieve the value at frame 100 of comp A. It has no idea where comp A is used at all as a precomp and if it is time-remapped or not.

Think about it like this:
If you would have three different precomps using comp A as a layer in comp B, and time-remap them all in different ways - how should the expression know, to which of these three occurrences it should belong? Ultimately, the expression like code just says "give me this value of comp A" and it does not state to which precomp layer (and its time-remapping) the link should be based on.

For essental properties it is a different story: Each essential property belongs to exacly one precomp layer. So even if you have three precomps A inside of B, the essential property belongs to exactly one of those - and hence it knows which time-remapping it has to use to find the correct time inside the precomp.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and 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
New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

This makes a lot of sense, thank you!  It dawned on me this was the case --- so I started thinking of a way to ensure Comp A is only used once -- but it seems to still grab that value.

 

The crappy part is the essential graphics version works fine (I'm decently savvy w/essential graphics, or I must just get lucky) --- the problem is I'm trying to build a library using "compCode" script from aeScripts -- which doesn't support essential graphics, so I'm trying to rebuild it natively.

So ultimately, without using Essential Graphics, is there anyway to achieve referencing a time-remapped value in a precomp?  I keep going in circles thinking "there's a way!", but don't want to keep wasting time.  I've searched any and every search term possible to find a solution.

 

Cheers

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 ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

You can retrieve the value of the time-remap property at the current time with the expression. Then you use this time-remap value to retrieve the value inside the precomp with valueAtTime instead of the normal picl whip link.

 

Extra tip: If CompCode is not powerful enough, you can also create template tools with my new extension Automation Blocks for Ae (currently in free public beta). It is not a 1 click solution, but very flexible and customizable. See this tutorial.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and 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
New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

I just screen capped this for other thread above, so figured I'd attach here so you can see what I'm trying to acheive. 

I need to grab the current width of each letter (animated with timeremap-keyframes) -- to drive the x-position of the following letter in the text string

 

2022-07-12_20-09-00.gif

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
New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

^^ This is the essential graphics version

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 ,
Jul 13, 2022 Jul 13, 2022

Copy link to clipboard

Copied

LATEST

I might be mistaken, but do you not just need to reference the comp in the expression:

comp("Comp 3").layer("AME.mp4").timeRemap

 

I normally do this by undocking the comp from the timeline and using the pickwhip to make it easier.

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