Copy link to clipboard
Copied
I created a timeRemap script for a characters head (face4) so that it would show suttle shadows on a characters face when the yRotation axes is rotated using a null object named "Face Center". When the characters head (face4) layer is rotated in the negative numbers of the y Axes, his face disappears after its at -7. Yet, everything seems to work fine when I go in the positive direction using the yAxes rotation.
The code I'm using is: timeRemap=timeRemap+(thisComp.layer("Face Center").transform.yRotation)/-25;
Can some one please assist me.
Thank you......
Copy link to clipboard
Copied
How many total frames do you have time remapped? I would leave the keyframed Time Remapping value out of the expression. Say you have 50 frames total. I'd do it like this:
center = 25; // center frame
(center + thisComp.layer("Face Center").transform.yRotation)/-25;
Dan
Copy link to clipboard
Copied
Thank you for your assistance.
Three (3) frames have been remapped. The center is set at frame 1.
The head is nested in a composition with a total of 8 frames.
I used your code and it yielded better results. Instead of the head disappearing at -5 it disappears at -32 but when the characters head is resting in the center at 0 on the X axes the shadow is no longer centered
What could the problem be once the character rotates in the - negative direction on the Y axes?
Copy link to clipboard
Copied
Only three frames? Then how about something like this:
r = thisComp.layer("Face Center").transform.yRotation;
if (r < 0 )
f = 0
else if (r > 0)
f = 2
else
f = 1;
framesToTime(f)
Dan
Copy link to clipboard
Copied
Thanks.....
Your 2nd code yields the opposite of your first code. Accept that, once it goes to the positive numbers (r < 0 ), the face disappears.
Copy link to clipboard
Copied
Dan, you have been a big help. I think I am able to solve the issue. I used my original code but instead of using / -25, I increased it to 360 and was able to see the full rotation of the characters head.
Thank you for your assistance.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now