probably for felt
I want stacked layers to make a “3d text” but i want the rotation to be delayed in each one like a delay effector in cinema.
im trying to usethisComp.layer(index-1).transform.zRotation.valueAtTime(time-5)
but doesnt seem to work .any idea?
also does this have to be universalized?
- Community Moderator
- Sold between 50 000 and 100 000 dollars
- Author was Featured
- Item was Featured
- Author had a File in an Envato Bundle
- Beta Tester
- Has been a member for 4-5 years
- United Kingdom
in z rotation
indexOffset = 10; //your first index
iterationOffset = 3; //how many degrees each layer is offset by
value + (thisLayer.index – indexOffset)*iterationOffset;
the way I’ve written it, it’s already universal because it doesn’t refer to any properties.
shouldnt i somehow refer to the zrotation of the previews layer? is this done with thisLayer.index?
got it .for what it’s worth found a script from Dan Ebberts
//applyTo: position
L = thisComp.layer("leader");
delay = 1.5;
timeToStart = 0;
myDelay = (index-L.index)*delay;
t = time-(timeToStart + myDelay);
if (t > 0){
delta = L.transform.position.valueAtTime(t) - L.transform.position.valueAtTime(timeToStart);
value + delta
}else{
value
}- Community Moderator
- Sold between 50 000 and 100 000 dollars
- Author was Featured
- Item was Featured
- Author had a File in an Envato Bundle
- Beta Tester
- Has been a member for 4-5 years
- United Kingdom
fAntasticmE said
got it .for what it’s worth found a script from Dan Ebberts
Oh I see… you want a “follow my leader” expression. Should have read your post more carefully…. didn’t see the bit about the delay effector. Looks like Dan’s expression will do the job nicely then. Just switch out position for rotation.
Note: If you want this to be universal, then you need to refer to properties by their index.
L.tranform.position.valueAtTime(t) becomes L(6)(2).valueAtTime(t);
If you don’t know a property’s index, type the expression thisProperty.propertyIndex and if you need the number of the level above it (i.e. like transform) then use thisProperty.propertyGroup(1).propertyIndex;
Or you could look at Expression Universalizer over at aescripts.com
i ve also seen you tut on universal expressions just have to refresh my memory. your script can do the job aswell
delay=1;
t=time-delay;
temp=thisComp.layer(index-1).transform.zRotation.valueAtTime(t);
if(t>0)
{
value=temp;
}
Pretty useful expressions, thanks guys!
- Community Moderator
- Sold between 50 000 and 100 000 dollars
- Author was Featured
- Item was Featured
- Author had a File in an Envato Bundle
- Beta Tester
- Has been a member for 4-5 years
- United Kingdom
fAntasticmE said
kept thinking it was to complicated.had to be another way.found this based on what i saw until now.it worksdelay=1; t=time-delay; temp=thisComp.layer(index-1).transform.zRotation.valueAtTime(t); if(t>0) { value=temp; }
You could shorten it further.
(t>0) ? thisComp.layer(index-1)(6)(10).valueAtTime(time-1):value;

But I would get into the habit of putting your layer ref into a variable like Dan does. It will save you hours of typing. And breaking code down into variables makes it easier to understand when you come back to read it and makes it more usable as you start to write longer expressions.
felt do you have any programming background or just js for after effects?
