Copy link to clipboard
Copied
This is hard to explain, but simple in logic
I have 2 comps.
COMP A - "c01" - 60 Frames
I precomped this into "COMP B" -- and time remapped it.
The Problem:
EXAMPLE 1 (Successful) If I place this into essential graphics I will get a value that reflects its current time-remapped value
EXAMPLE 2 (Unsuccessful) If I don't place it in essential graphics, it keeps spitting out the original linear (non-timeremapped) value
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.
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
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
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
Copy link to clipboard
Copied
^ This is the essential graphics version
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.
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
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.
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
Copy link to clipboard
Copied
^^ This is the essential graphics version
Copy link to clipboard
Copied
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.