Alfred Timotei
Forum Replies Created
-
Hi again,
I’ve tried another thing. Depending on the last letter in the text layer, is possible that earlier expression doesn’t see exactly the last pixel. I’ve set the y to be in the middle of the text row, but for example if I have the last letter an X, the result will not be correct. So I’ve used a for statement also for y. But my computer look like an x86 when the expression is running. Do you think there is a way to make the expression to use fewer resources?
x2=0;
t=thisComp.layer("Burtiera 1");
for(y= 640; y <=680; y++){
for(x=1920; x >= 0; x--){
r=t.sampleImage([x,y],[1,1]);
if(r[3] > 0) break;
}
if(x>x2) x2=x;
}
x2 -
Thank you very much Dan.
I sure didn’t understand the FOR statement. I thought that the loop stops when the second parameter (condition) is accomplished, but now I think I understand it. Please correct me if I’m wrong. The loop stops when the condition is not correct anymore. -
I am sure it is late (after 4 years or so :D) but maybe there are others who need this answer.
You can set the orientation on 45 degree and then use the rotation parameter to set it as you need. If you adjust the orientation parameter first, you can achieve what you want.
-
Alfred Timotei
January 20, 2015 at 9:08 am in reply to: Controling outro effects with layer outPointHi again Dan, I’ve run into another problem. 😀
I saw that I can use easeIn or easeOut instead of linear, but for the sake of design I wanted to use the Ease and Wizz ExpoOut and ExpoIn.
How can I combine the two blocks of code? Basically, I want the ExpoOut or ExpoIn affect only the last 2 keframes.
Best regards,
Alfredop = comp("Corporate 1 MAIN COMPOSITION").layer("1 Intro Logo").outPoint-0.034;
if (numKeys > 1){
n = numKeys;
v1 = key(n-1).value;
v2 = key(n).value;
t1 = key(n-1).time;
t2 = key(n).time;
if ((time > t1) || (time > op-(t2-t1)))
easeOut(time,op-(t2-t1),op,v1,v2)
else
value;
}else
value// Ease and Wizz 2.0.3 : outExpo : All keyframes
// Ian Haigh (https://ianhaigh.com/easeandwizz/)
// Last built: 2012-10-11T16:37:31+11:00// some defaults
var p = 0.8; // period for elastic
var a = 50; // amplitude for elastic
var s = 1.70158; // overshoot amount for "back"function easeandwizz_outExpo(t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
}function easeAndWizz() {
var n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
if (key(n).time > time) { n-- }
}try {
var key1 = key(n);
var key2 = key(n+1);
} catch(e) {
return null;
}// determine how many dimensions the keyframes need
var dim = 1; // It's gotta have at least ONE dimension
try {
key(1)[1];
dim = 2;
key(1)[2];
dim = 3;
} catch(e) {}t = time - key1.time;
d = key2.time - key1.time;sX = key1[0];
eX = key2[0] - key1[0];if (dim >= 2) {
sY = key1[1];
eY = key2[1] - key1[1];if (dim >= 3) {
sZ = key1[2];
eZ = key2[2] - key1[2];
}
}if ((time < key1.time) || (time > key2.time)) {
return value;
} else {
val1 = easeandwizz_outExpo(t, sX, eX, d, a, p, s);
switch (dim) {
case 1:
return val1;
break;
case 2:
val2 = easeandwizz_outExpo(t, sY, eY, d, a, p, s);
return [val1, val2];
break;
case 3:
val2 = easeandwizz_outExpo(t, sY, eY, d, a, p, s);
val3 = easeandwizz_outExpo(t, sZ, eZ, d, a, p, s);
return [val1, val2, val3];
break;
default:
return null;
}
}
}(easeAndWizz() || value);
-
Alfred Timotei
January 17, 2015 at 10:26 pm in reply to: Controling outro effects with layer outPointThank you very much Dan, it’s working great, it’s exactly what I needed.
Best regards,
Alfred -
Alfred Timotei
January 17, 2015 at 9:37 pm in reply to: Controling outro effects with layer outPointHi Dan,
I managed to access the time value in seconds from the comp that I need. The problem is how I set the last 2 keyframes to match that value. That is my problem.
I have 3 sections in the timeline 1.intro effect 2.still 3.outro effect. I must move the last 2 keyframes but the distance between them must remain the same. Only the duration of the still must modify.
Best regards,
Alfred
