Skip to main content
Participant
January 25, 2024
Answered

Gauge values following excel data over time

  • January 25, 2024
  • 2 replies
  • 640 views

Hi,
I am trying to create 5 gauges on my video that will display different values and would need to change 18 times throughout the video.  The gauges values would need to bu updated a few times, so im hoping to create and easily updatable workflow. 

I manage to create an excel generated IF expression, but id like to make the transitions smother. Could you help me come up with an expression that i can generate from excel and has the desired results? 

 

Target video, excel table and current progress attached. 

This topic has been closed for replies.
Correct answer Mylenium

You may want to read the online help on how to actually use external data and then none of this is an issue:

 

Work with Data-driven animation

 

It's easy enough to generate inbetween values in Excel and fetch them frame by frame without requiring any extra code to address individual indices in AE and blend the values with linear() or such.

 

Mylenium

2 replies

Legend
January 25, 2024

You can use Linear expression

and markers with % values

 

Rectangle 2 -> transform -> anchorPoint

 

[value[0] ,content("Rectangle 1").content("Rectangle Path 1").size[1] / 2]

 

Rectangle 2 -> transform -> position

 

[value[0] ,value[1] + content("Rectangle 1").content("Rectangle Path 1").size[1] / 2]

 

Rectangle 2 -> transform -> scale

 

if (time > marker.key(1).time) {
  for (var i = marker.numKeys; i >= 1; i--) {
    if (marker.key(i).time < time) {
      t1 = marker.key(i).time;
      y1 = Number(marker.key(i).comment);
      t2 = marker.key(Math.min(i + 1, marker.numKeys)).time;
      y2 = Number(marker.key(Math.min(i + 1, marker.numKeys)).comment);
      break
    }
  }
} else {
  t1 = inPoint;
  y1 = 0
  t2 = marker.key(1).time;
  y2 = marker.key(1).comment
}
[100, linear(time, t1, t2, y1, y2)]

 

 

 

 

 

Mylenium
MyleniumCorrect answer
Legend
January 25, 2024

You may want to read the online help on how to actually use external data and then none of this is an issue:

 

Work with Data-driven animation

 

It's easy enough to generate inbetween values in Excel and fetch them frame by frame without requiring any extra code to address individual indices in AE and blend the values with linear() or such.

 

Mylenium