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

Text content based on expression randomly glitches

Explorer ,
Nov 28, 2022 Nov 28, 2022

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.

Ondrej5FCA_0-1669643154138.png

Ondrej5FCA_1-1669643162257.png

image.png

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
LEGEND ,
Nov 28, 2022 Nov 28, 2022

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

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
Explorer ,
Nov 28, 2022 Nov 28, 2022

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.

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
LEGEND ,
Nov 28, 2022 Nov 28, 2022

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

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
Explorer ,
Nov 28, 2022 Nov 28, 2022

The Math.max() function was used to fix the final zero in place.. And even when I deleted it, the glitches remained.

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
LEGEND ,
Nov 28, 2022 Nov 28, 2022

Check your font as already mentioned. The code appears to work just fine.

 

Mylenium

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
Explorer ,
Nov 28, 2022 Nov 28, 2022

I've tried several different fonts with various settings. Always the same result.

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
Explorer ,
Nov 28, 2022 Nov 28, 2022

Truth to be said, in a completely blank, new project it works just fine even with the same font.

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 ,
Nov 28, 2022 Nov 28, 2022

Is there a Tracking Animator, an animated mask, or a track matte involved?

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
Explorer ,
Nov 28, 2022 Nov 28, 2022

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.

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 ,
Nov 28, 2022 Nov 28, 2022

Any Source Text keyframes around the time of the glitch?

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
Explorer ,
Nov 28, 2022 Nov 28, 2022
LATEST

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.

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