Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Animation of temperature graph

  • Animation of temperature graph

    Posted by Janek Dole on January 15, 2020 at 1:36 pm

    Hey guys, I would appreciate your help and insight, how I could solve this problem:

    I have a weekly temperature graph. Temperature values are taken from Txt file and with an expression converted to Y position value of Null layer. So, whenever I update the txt. file, the temperatures jumps in their position. Saves me ton of time.

    But… I woul love to improve this, animate it so the temperature line moves to its position. I mean, in the begining it would be flat (all Nulls in the middle at 780px) and than every Null moves to whatever value it has.

    I tried to use a slider to animate it from 0>100% of its position but I can not find a way to join my expression to a slider part of expression, it works separately though:)


    //this works ☺ expression only for Y position, no movement

    //overall minimal temperature in graph, already set in the txt file
    var minValue = footage("weeklytemp_2020.txt").dataValue([5,0]);
    //overall maximal temperature in graph, already set in the txt file
    var maxValue = footage("weeklytemp_2020.txt").dataValue([6,0]);

    //here I adjust values so the graph matches my vertical range of 880-680px
    var temperature = footage("tyden_2020.txt").dataValue([3,0]);
    linear(temperature,min,max,880,680);

    I would like to add something like this:


    //one slider could operate all Nulls, every null yould have different endPosition
    sliderValue = thisComp.layer("control1").effect("Slider Control")("Slider");
    startPosition = 780;
    endPosition = ?? ...... here lies the problem, this value is the output from code above, how could I get it in here?
    linear(sliderValue,0,100,startPosition,endPosition)

    I hope you could understand what I am trying to do and possibly help me, thank you guys!

    Janek

    Janek Dole replied 6 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Graham Quince

    January 19, 2020 at 3:07 pm

    I’ve only ever used linear() with time as the first variable, what we’re looking at for you is:

    Linear(

    Current time,

    Starting time,

    End time,

    Start position (i.e. 780),

    End position (i.e. final calculated temperature position)

    )

    So start time would be 0, end time would be the time the animation takes.

    I think. Hope it’s right.

    Sounds like a useful project.

    http://www.YouTube.com/ShiveringCactus – Free FX for amateur films
    https://shiveringcactus.wordpress.com/ – FX blog

  • Janek Dole

    January 20, 2020 at 3:36 pm

    thank you Graham! I will definitely try your solution.

    I SOLVED this not in the most elegant way I guess… I doubled the number of Nulls and its all animated through a Slider controll… but it works ????

    – so the line graph is operated with a set of Nulls, they get their position from txt file

    – Now Ive created another set of Nulls, so one group of Nulls for holding the position data, the other group for movement

    – it is connected to 1 slider, when on 0 its on start position (all flat) and when on 100 it moves to final position

    You could see the animation concept here:

    https://photos.app.goo.gl/dMFP4Y1kWAPWrxK28

    Thank you!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy