Copy link to clipboard
Copied
I've set up a simple timer counting from 30 to 0 seconds. It works fine except the actual rendering of the numbers. Sometimes, at the end of a second, the number shifts it selves to the side before transitioning into the following one. It's a matter of 1 frame, but noticeable.
Does anybody please know how to fix it?
Thank you.
Copy link to clipboard
Copied
Without seeing your code nobody can tell you much. This simply looks like you are using some code that uses dynamic alignment/ padding and the internal logic is simply one frame off. Eitehr that or you are using a font that produces alternate glyphs. in the latter case you could at least try and turn these options off in the character palette. Anything else will require proper details.
Mylenium
Copy link to clipboard
Copied
Sorry for the lack of detail.
The whole expression I'm using goes like this:
rate = -1;
clockStart = 31;
clockTime = Math.max(clockStart + rate*(time - inPoint),0);
t = Math.floor(clockTime);
min = Math.floor((t/3600)/60);
sec = Math.floor(t%60);
Compisition has relular settings, 1080p 25fps.
Copy link to clipboard
Copied
Get rid of the Math.max. in this context it doesn't make any sense. To convert fractional values use Math.round or use the built-in timeToFrames() method.
Mylenium
Copy link to clipboard
Copied
The Math.max() function was used to fix the final zero in place.. And even when I deleted it, the glitches remained.
Copy link to clipboard
Copied
Check your font as already mentioned. The code appears to work just fine.
Mylenium
Copy link to clipboard
Copied
I've tried several different fonts with various settings. Always the same result.
Copy link to clipboard
Copied
Truth to be said, in a completely blank, new project it works just fine even with the same font.
Copy link to clipboard
Copied
Is there a Tracking Animator, an animated mask, or a track matte involved?
Copy link to clipboard
Copied
None of the mentioned in this text layer. In terms of the whole composition, yes. But all the mattes don't interfere with this text layer.
Copy link to clipboard
Copied
Any Source Text keyframes around the time of the glitch?
Copy link to clipboard
Copied
Nope, no keyframes at all. Only the expression. But the layer is attached via parenting tool to the blue box below, after the countdown it moves to the left.