1.Go ahead and time remap the glass layer and the ‘precomp holding the footage’ until it suits you.
2.Duplicate the ‘precomp that is holding the footage’.
3.Delete the time remapping on the duplicate layer.
4.Presuming the original ‘precomp holding the footage’ is called layer “x”, apply the following expressions to the duplicate layer:
To position:
L=thisComp.layer(“x”);
L.toWorld(L.anchorPoint)
To orientation:
C = thisComp.layer(“x”);
u = C.toWorldVec([1,0,0]);
v = C.toWorldVec([0,1,0]);
w = C.toWorldVec([0,0,1]);
sinb = clamp(w[0],-1,1);
b = Math.asin(sinb);
cosb = Math.cos(b);
if (Math.abs(cosb) > .0005){
c = -Math.atan2(v[0],u[0]);
a = -Math.atan2(w[1],w[2]);
}else{
a = Math.atan2(u[1],v[1]);
c = 0;
}
[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]
5.After the expressions are applied, turn off the eyeball and sound for the original ‘precomp that is holding the footage’ layer. Its only function is to feed coordinate data to the duplicate layer holding your properly timed footage.
These expressions are thanks to Dan Ebberts. I picked them up from following posts relating to .toWorld expressions. If you’re wondering, the orientation expression is necessary to solve the discrepancy in the motion path caused from the combined axes of the X,Y,&Z rotation parameters moving in unison. Hope that makes sense. If not, the following posts should clear things up.
https://forums.creativecow.net/thread/227/9572
https://aenhancers.com/viewtopic.php?f=9&t=653&start=30
Let me know if these expressions help.
all the best to you,
Darren Gardner
Designer/Animator
https://gardnerfx.com