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

ExtendScript: Find fastest point on a graph

Explorer ,
Jan 05, 2022 Jan 05, 2022

Hey everyone, I've been searching for days and I can't find a solution:

How can I find the fastest point of a graph via scripting? ( so in the speed graph it's the highest peak )

RedyCode_0-1641404909222.png


I have a working solution ( The script goes into a for loop and it gets the value of every frames between the 2 keyframes and then it finds the difference between every value to find the biggest difference, if that makes sens ) but it doesn't work perfectly with everything
—especially when it comes to the CUSTOM_VALUES or some path—so I want to find a better solution, maybe a solution working with the easing ( like the influence and speed )

Thanks in advance,
Redy

TOPICS
Error or problem , FAQ , Scripting
212
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

correct answers 1 Correct answer

LEGEND , Jan 06, 2022 Jan 06, 2022

You need to create a differential and measure the length of the resulting vector if simple thresholding and differentiation doesn't provide distinct results. That and of course you have to view this at a much larger scale. Such calculations based on only two immediate keyframes rarely provide stable results. Ideally you would have a convolution/ pyramid and iterate through different time spans, then average and smooth the results. That would also allow to extrapolate results if no proper solutio

...
Translate
LEGEND ,
Jan 06, 2022 Jan 06, 2022

You need to create a differential and measure the length of the resulting vector if simple thresholding and differentiation doesn't provide distinct results. That and of course you have to view this at a much larger scale. Such calculations based on only two immediate keyframes rarely provide stable results. Ideally you would have a convolution/ pyramid and iterate through different time spans, then average and smooth the results. That would also allow to extrapolate results if no proper solution is found between two adjacent frames. In your case you likely would also need to figure in the vectors of the original keyframes, which such a solution could also take care of by dynamically roving beyond the ends of your segment. Anyway, you will have to make this more complex to get good results.

 

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
Explorer ,
Jan 06, 2022 Jan 06, 2022
LATEST

Thanks for the answer, I really appreciate it. I found an easier workaround tho, pretty hard to explain so if someone really needs it you can ask me

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