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

valueAtTime from parent Comp

Explorer ,
May 27, 2019 May 27, 2019

Hello,

I have a nested comp which is time-remapped.

I need from within this nested comp to animate a parameter (trim path end of a circle shape) using a slider value in my main comp.

My problem is that this animation is done according to the remapped timeline and not the main comp timeline.

I thought something like this could work :

comp("Comp 1").layer("Settings").effect("Speed")("Slider").valueAtTime(comp("Comp 1").time)

... but I can't retrieve comp("Comp 1").time

Can someone help please ?

Thnx

TOPICS
Expressions
2.8K
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
Contributor ,
May 27, 2019 May 27, 2019

The comp itself doesn't have any sense of "time" -- what you could do is look at the offset in time between one comp and the other, and add or substract that to the valueAtTime.

That is, if the precomp starts 5 seconds before the main comp, then you'd use `valueAtTime(time - 5)`.

I go into this a little bit here: https://zacklovatt.com/sync-precomp-audio/

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
Explorer ,
May 27, 2019 May 27, 2019

Hello zlovatt,

Thanks for your answer. I'll try to follow the offset solution you propose.

I can't do time - x if x is fixed because my child comp has a fluctuating time remapping.

Why is that that the comp has no sense of time? The read head cannot be positioned in time and expose this position?

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
Contributor ,
May 27, 2019 May 27, 2019

Well! In that case, pickwhip the time remap property and use that for valueAtTime?

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
Explorer ,
May 28, 2019 May 28, 2019

In fact it's the opposite I wish I could do: remove the time remapping on just one parameter of my comp while the rest of it remain in the remapping scope.

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
Explorer ,
May 28, 2019 May 28, 2019

I add 2 screenshots, hopping it would make my case clearer

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
Contributor ,
May 28, 2019 May 28, 2019

So this isn't straightforward to do. The best way would be to just _not_ have that property in time remap, or control this in a different way; what you're trying to do is difficult and not the best approach.

What about:

  • have a slider in the ring comp where you have the timing laid out instead of Time Remap
  • On the ellipse, use `value.valueAtTime(slider)` so it gets the current value, but at the slider's time
  • Then the Trim End you have linked to the slider.

Would that approach solve this?

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 ,
May 28, 2019 May 28, 2019
LATEST

Agree with Zack. Don't mess with parameters inside a time-remapped comp. In addition to being nigh on unpredictable it can also cause rendering issues. Animating this with a slider would indeed be advisable. Also make good use of markers as reference to keep the timing straight.

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