Robert Müller
Forum Replies Created
-
Hi, how are you animating the bars, are they just simple rectangle shape paths?
Your best option would be to go with the linear expression, like this
v=footage("data.csv").dataValue([0,0]);
s=thisComp.layer("shape 1").content("bar").content("bar").size[0];
linear(s,0,1000,0,v)+"%"
While the width of the bar reaches the value 1000, linear interpolates the corresponding percentage value. If you use a different method you could also linear along the time. Maybe you could show us how you animate the bar? -
Thanks for the replies guys, but this didnt seem to work. Ive tried some more with just the positions of a null object driving an object in a scaled down precomp but its still offset. Ive attached a screenshot to illustrate the problem. The green mask on “comp2” is just to show you where the bounding box of the composition would be if I would switch collapse transformation off

-
You could use sine for this, like this maybe?
spd = 5;
fct = 3;
s=Math.sin(time*spd)*3;
[value[0]+s,value[1]]
“spd” is the speed of the sine function and “fct” is by how much the value will change. -
I assume your red box is a rectangular path in a shape layer as well? to link the other shape to the edge of your box you must link it to the width of the box.
-
You dont need to resize the bill. You could either use an adjustment layer on top of your image, which would also influence the layers below so you might want to precomp it. Or you could just precompose the image layer, ad the Turbulent Displace effect on the comp and check “collapse transformations” for the comp in your layer stack
-
Robert Müller
June 24, 2020 at 10:34 am in reply to: Passing layer sourceText into double quotes of an expression?Hi Andrew,
No quotes for variables my friend ?
colName = thisComp.layer("Type Col Name Here").text.sourceText;
thisComp.layer("Population2019.csv")("Data")("Outline")(colName)(colName + " 0").value); -
Hi, this should do what you are looking for
t=timeToFrames();
frameStep=3;
days=30;
Math.floor(t/frameStep)%days+1
this counts to 30 (or any number you put for “days”) every 3 frames (or any number you put for “frameStep”), starting at 1 and resetting back to 1 after 30.
If you want to stop at 30 try this:
t=timeToFrames();
frameStep=3;
f=Math.floor(t/frameStep)+1;
if (f>30){30}else{f}; -
Robert Müller
June 18, 2020 at 9:11 am in reply to: zero position, rotation and rotationorientation via scriptUI PanelHey Markus, Ive got no script for you but a quick tipp: If you hold shift while parenting a layer (even if its allready parented) the child moves to the location/rotation/orientation of the parent 🙂
-
Robert Müller
June 18, 2020 at 9:07 am in reply to: create a path with expressions and use methods like pointOnPathOkay it seems like the pointOnPath expression needs a drawn path to calculate. But since you are using expressions to draw your path there should be other ways to calculate the mid point.
-
Robert Müller
June 17, 2020 at 12:31 pm in reply to: Drawing Graphs for animated values (Scale, Position etc)Hi Vadim,
I quickly hacked this together, which plots a line for the scale value of a specific object. It might not be exactly what you are looking for but this should point you in the general direction and give you something to work with ☺yBase=400; //y Position the graph should "start" on.
xStart=-900; //leftmost point of the graph
xEnd=xStart*-1; //rightmost point of the graph
fTotal= timeToFrames(thisComp.duration); // getting the total number of frames so that each frame will represent a point on the path
xStep=length(xStart,xEnd)/fTotal; //distance between the points, steps
pointArr = []; //creating an empty array
lay= thisComp.layer("Object"); //the "watched" layerfor (i=0; i<= fTotal; i++){
pointArr.push([xStart+(i*xStep),yBase-(lay.transform.scale.valueAtTime(framesToTime(i))[0])])
}
/*
I get the x position of each point on each frame, starting from the xStart value.
Then I get the values of one of the scale dimensions on every frame and substract that from my yBase line.
Then I push the value as x and y into my empty array
*/
createPath(pointArr,[],[],isClosed=false);
Since I dont go after tangents I added a round corners to the shape layer.
And to have the graph animate I simply put this expression on the end property of a trim paths I added on my graph:
linear(time,0,thisComp.duration,0,100)