Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

timeRemap Scripting problems???? Help

New Here ,
May 18, 2011 May 18, 2011

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......

TOPICS
Expressions
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2011 May 18, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 18, 2011 May 18, 2011

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2011 May 18, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 18, 2011 May 18, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 18, 2011 May 18, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines