Robert Müller
Forum Replies Created
-
Okay, I dont really get what you are doing here. You have two text objects, one for each line, is that right? So if your logos position should be dependend on the second line, why are you measuring the width of the first line (and btw, multiplying by +1 does nothing, you can leave that out. Only -1 inverts the sign)? Why are you getting the distance between the logo and the second line and substract 50 from it? This is what I came up with as far as I understood:
var xDist = thisComp.layer("SText").sourceRectAtTime().width * -1;
var logoWidth = length(thisComp.layer("LOGOS NON TYPE FACE").transform.xPosition, thisComp.layer("LINE 2").transform.xPosition)-50;
(thisComp.layer("Ctrl").effect("Logo Selector")("Slider") == 7) ? xDist + logoWidth :xDist;
Its always a good tipp to mess around with the signs when switching directions in an expression.
But I think, again based on my understanding of the situation, it would be far easier to grab the position of your second line, subtract the width of the same layer and maybe add some padding (assuming your text is aligned to the right and the anchor point is on the right edge). -
Ok some thoughts: First of all, this isnt going to work how you are imagining it. Since the slider is just selecting the columns, theres no way for doing that by animating the slider since AE cant interpolate between whole data blocks. However, you can ease with just expressions using time as the ease parameter
end = ease(time,0,1,[x0],[x1]);
With 0 being the starting time of the ease and 1 being the length. However for this to be useful in your case you would have to get every possible value and put them in an array. But even if you would be fine with just 2 different states of the graph you would still need to update your expression, since your calculation for the next value does not work properly
v1 = footage("04_2_YourCSV.csv").dataValue([slide+1,0]);
x1 = (v1/vMax)*100;
First of all there is no 7th column in your CSV so if you reach the 6th value it cant just add 1 and fails. You need to check for that.
Second your second value is compared to the max value of your first array. -
This looks like a bug to me, since the editing font size is far beyond what you can set in the preferences. You should report that to Adobe or at least post in their support forum.
-
Okay I dont get it exactly, the expression is on your trim path end property? And are you trying to animate your slider or what? A screenshot or better a project file would really help to understand what exactly you are trying to do
-
“I attached a light to the graphic and made sure it cast shadows. Made sure the graphic accepted shadows also.”
So did you turn on cast shadows only on the light or on the object as well? You have to turn cast shadows on for both the light AND the object you want to cast a shadow. At least thats for me in CC, I don’t know if there is that big a difference in CS4
-
Robert Müller
May 8, 2020 at 8:47 am in reply to: How do I set the font style for text that was concatenated with expressions?What Andrei meant is, that you cant set two different styles for the same text layer yet. The style you set in an expression would affect all the text, even the original from txt1.
-
Robert Müller
May 7, 2020 at 8:27 am in reply to: Changing variable value based on multiple conditionsHi, just so that I understand correctly: The four conditions HAVE to be based on the 2 different variables myProp and altKey and their different states? Can you share some more details why 1 variable wouldnt be enough?
-
Hi, using this script by Dan Ebberts I got it kinda working the way you want to, but a little bit different. The clock works now by a slider-value, which dictates how long a 6hour cycle will take.
Expression for the minute hand:
cyc= thisComp.layer("Null 1").effect("6h-cycle length")(1); //the aforementioned slider, here with the value 5(sec)
t=time%cyc; //t as a time driven variable will jump back to zero every "cyc" seconds
seg = Math.floor(time/(cyc)); //calculating the number of rounds, important for the last step
(180*12)*seg+linear(t,0,cyc,0,(180*12)) //"linear"-ing the rotation and adding the amounts of full rotations
180*12 for 6 full rotations, I was to lazy to tidy this up. I also forgot to calculate for the layer.inPoint, for example if you move your layer around on the timeline.
Expression for the hourhand:
thisComp.layer("min").transform.rotation/12 //Nothing special, just dividing the minute rotation by 12
And the most important, expression on the sun/moon-thingy:
rampDur = thisComp.layer("Null 1").effect("6h-cycle length")(1); //same
segDur = 2*rampDur;// double it up for a full 12h circle. Since the widget will be resting for 6 hours and rotating for the other six
t = (time+rampDur - inPoint)%segDur; //same as before but this time I "offset" the whole thing by a 6 hour cycle, since it should start stationary
seg = Math.floor((time+rampDur-inPoint)/segDur); //again as before but added the "rampDur" as a 6-hour-cycle offset
180*seg + ease(t,0,rampDur/1,0,180)// decided to use ease instead of linear since it looks nicer. I explain below why I left the devision after rampDur in
I hope you understand evertything with my comments, but I’ll attach a file as well. Now, if you want to speed up or slow down your clock animation change or animate the slider on the Null. If you feel your sun/moon rotation should be faster than a 6-hour-cycle, just divide the last rampDur in the ease by the desired amount, eg in this case by 5 to have the rotation be 1 second long. In this example I put the 1 to leave it just as it is.Project file:
I hope I could help, I definetly learned a few new things while working on this problem ???? Thanks to Dan for his awesome expression powers, I hope its okay I borrowed from your last solution… and didnt even bother to rename the variables. Sorry!????
-
Hi,
if you parent your null to another layer, the position of the null will always be relevant to the parent layer. You need to use “toComp” (or “toWorld” for 3d layers) to get the global position of your null.p = thisComp.layer("Null 1").toComp(anchorPoint);
s = thisLayer;a = s.sampleImage(p,[.1,.1])[3];
linear(a,0,1,0,100) -
Robert Müller
April 29, 2020 at 12:29 pm in reply to: Order of expression calculations – or link an already calculated expressionHi thanks for your answer, I’ll try to clarify more.
the rotation property seems to have a problem with referencing the post-expression position (in this case the overshoot). It works just fine until the overshoot, when it just stays at 0. I was wondering if this was the case because im referencing the position via an array (so “position[0]”) since I a) only need the x-value and b) cant seperate the dimensions. But I guess its enough that its working when Im calculating the position overshoot in the rotation-expression again. 🙂