Nevermind! I just realized a better way to do this. I was trying to make an expression to make easy for buyers to change the end time of an specific item (a lower third in my case) by using 1 marker.
What I did was I put this expression in the time remap effect of the lower third composition. The time remap have only 2 keyframes (one for 0 and another for the exact moment when the animation starts to end)
Resuming, This:
Probably it could be better, but I'm noob with expressions.
Aniway, here is the expression, maybe it will be useful for someone else (:
if(time >1.6){ // time before intro animation
action = thisComp.layer("YOURLAYERNAME");
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
nâ;
}
}
if (n == 0){
2.17 // animation will keep freeze at this choosen time
}else{
k = 0;
if (numKeys > 0){
k = key(2).time;
}
m = marker.key(n);
t = time - (m.time - k); // time at the marker will be the time of the 2Âș keyframe
Make a 3D layer called Solid 1 in a comp called Comp 1. Pre-comp it moving attributes. Make the layer created 3D, collapsed and call it âPre-compâ. Inside precomp, make a 3D Point Control effect (I think this exists in CS5.5) and call it âworld vecâ. On this effect use the expressionâŠ
thisLayer.toWorldVec([0,0,1]);
This makes sure that the toWorldVec calculation is taking place with respect to the world space inside that comp. (which of course is the same as the layer space of the layer âPre-compâ).
Then, make a Tint effect on the layer âPre-compâ. On the Amount to Tint property do thisâŠ
v = thisLayer.source.layer("Solid 1").effect("world vec")(1); //pick up the world coords from the effect
vWrld = thisLayer.toWorldVec(v);
vecCamToLyr = normalize(thisLayer.toWorld(thisLayer.anchorPoint)-thisComp.activeCamera.toWorld([0,0,0]));
dot(vecCamToLyr, vWrld)>0 ? 100 : 0;
Iâm using the dot product, because toCompVec seems to be unreliable with any vector other than [0,0,1]. Not quite sure why. Iâd need to spend some time testing it. The dot product compares the orientation of the calculated vector in world space and the vector from the camera to the layer.
Iâm being a bit rushed with this, 'cos Iâve got lots to do, but hopefully this will work. It seemed to work when I gave it a quick test.
How to rewrite these expressions that overlay Tint effect several layers in âPre-compâ ?
âPre-compâ consists of several 3D layers, each of which is overlay Tint.
Hi Andrew,
I canât remember what the original question was in the post you quoted and I donât really understand your question. Can you explain what youâre trying to achieve?
Hi Andrew,
I canât remember what the original question was in the post you quoted and I donât really understand your question. Can you explain what youâre trying to achieve?
Hi.
This thread began with the post:
How to make a layer invisible when facing away from camera ?
I found a few solutions for different cases but not for all..Please help! :)
Level I: Just a 3D layer
if (toCompVec([0, 0, 1])[2] > 0 ) value else 0
Level II: Pre-compose 3D layer
value*normalize( dot(toWorldVec([0,0,1]),normalize(comp(âMainCompâ).activeCamera.toWorld([0,0,0])-toWorld(anchorPoint))));
Level III: Pre-compose 3D layer AND composition rotation
???
You found solutions for Level III.
I need to solve for Level 4:
In Pre-compose several rotating 3D layers AND Pre-compose in Comp1 rotation
The code is very precise. Your description needs to be very precise too. You need to describe the exact structure of your project or you need to make a project file available.
The code is very precise. Your description needs to be very precise too. You need to describe the exact structure of your project or you need to make a project file available.
The code is very precise. Your description needs to be very precise too. You need to describe the exact structure of your project or you need to make a project file available.
Nevermind! I just realized a better way to do this. I was trying to make an expression to make easy for buyers to change the end time of an specific item (a lower third in my case) by using 1 marker.
What I did was I put this expression in the time remap effect of the lower third composition. The time remap have only 2 keyframes (one for 0 and another for the exact moment when the animation starts to end)
Resuming, This:
Probably it could be better, but I'm noob with expressions.
Aniway, here is the expression, maybe it will be useful for someone else (:
if(time >1.6){ // time before intro animation
action = thisComp.layer("YOURLAYERNAME");
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
nâ;
}
}
if (n == 0){
2.17 // animation will keep freeze at this choosen time
}else{
k = 0;
if (numKeys > 0){
k = key(2).time;
}
m = marker.key(n);
t = time - (m.time - k); // time at the marker will be the time of the 2Âș keyframe
Hi, everybody. There is a function in AE - when you create a project in CS5.5 you can save a copy as CS5. Is it possible to do the same thing with FFX animation presets? Or presets created in CS5.5 can be opened in CS5 without some special way of saving?
Hi, everybody. There is a function in AE - when you create a project in CS5.5 you can save a copy as CS5. Is it possible to do the same thing with FFX animation presets? Or presets created in CS5.5 can be opened in CS5 without some special way of saving?
Never done this but when I think of it this seems a logical solution:
Apply the preset in CS5.5, save project as CS5.
Open the project in CS5.
Select all effects and properties that make up your .ffx preset.
Go to: Animation > Save preset.
Edit: sorry just re-read your initial post. No I donât think there is any other way to open new .ffx presets in older versions.
Hi, everybody. There is a function in AE - when you create a project in CS5.5 you can save a copy as CS5. Is it possible to do the same thing with FFX animation presets? Or presets created in CS5.5 can be opened in CS5 without some special way of saving?
Never done this but when I think of it this seems a logical solution:
Apply the preset in CS5.5, save project as CS5.
Open the project in CS5.
Select all effects and properties that make up your .ffx preset.
Go to: Animation > Save preset.
Edit: sorry just re-read your initial post. No I donât think there is any other way to open new .ffx presets in older versions.
Yes, the problem is I donât have CS5, so when I open a file saved as CS5, it automatically converts back to CS5.5. It looks like youâre right and thereâs no other way.
Iâve been looking at MotionIdeaâs expression (on the last page) for using a Marker to begin an âendâ animation, based on Time Remapping the layerâs pre-comp.
Is there a way of using a Marker to instruct a layer to actually ANIMATE OUT (using its position values) without using Time Remapping or pre-comps?
Time Remapping only helps if nothing moves (in the pre-comp) whilst we wait for the END marker.
So, at the Marker âENDâ (a Comp Marker would be best) the Layer would move from its current position (value) to a second position (eg. -1920 on âxâ) over 10 frames, for instance, WITH an Ease Out.
Using a Comp Marker (as opposed to a Layer Marker) would allow multiple layers to act at the same mark but be individually adjustable, in terms of their final position and time taken (ie. 10 frames).
Hi. I want to build a script that assigns a labeled layer to another layer. Is it possible? For now I do this through the control layer with expression. Thanks for the answer.
Show me an example how to use âandâ in if expresision: if bla bla and bla bla âŠ
Hereâs an example Iâm using right now on a layerâs opacity-
val1=thisComp.layer(âlayer1â).transform.opacity;
val2=thisComp.layer(âlayer2â).transform.opacity;
if (val1 == 0 && val2 == 0){
100
}else{
0
};
If the opacity on layer1 and layer2 equals 0 my layerâs opacity will be 100 otherwise 0.
Show me an example how to use âandâ in if expresision: if bla bla and bla bla âŠ
Hereâs an example Iâm using right now on a layerâs opacity-
val1=thisComp.layer(âlayer1â).transform.opacity;
val2=thisComp.layer(âlayer2â).transform.opacity;
if (val1 == 0 && val2 == 0){
100
}else{
0
};
If the opacity on layer1 and layer2 equals 0 my layerâs opacity will be 100 otherwise 0.