Get exact values for animation of growing fonts

Typesetting help and general discussion.

Get exact values for animation of growing fonts

Unread postby Kyouma » Wed May 18, 2016 9:01 pm

Hi, guys. Is it possible to calculate the fscx/fscy values to match the growing of the harsubbed (e.g. a growing movie logo)?
User avatar
Kyouma
{\b1}
{\b1}
 
Posts: 13
Joined: Wed May 18, 2016 7:55 pm

Re: Get exact values for animation of growing fonts

Unread postby jfs » Fri May 20, 2016 2:40 pm

If you measure the size of the original object at the beginning of the animation and the end of the animation, you can easily calculate how much it has grown/shrunk.

E.g. if you determine that initially, the left edge of the logo is at 220 pixels and the right edge is at 370 pixels, and at the end the left edge is at 180 and the right edge is at 490, then the initial width is 150 pixels, and the final width is 310 pixels. Dividing those, you get 310/150 = a factor 2.067 growth, and multiply by 100 to see that it's a 206.7 % growth.
Do not PM me asking for help with Aegisub, Automation, karaoke or anything like that, I won't reply.
Ask your questions in the public forums. Use the Search function, somebody probably asked the same question before.
All rights reserved to call you insults if you ask poorly thought out or redundant questions.
Experimenting is free and is a great way to learn things.
User avatar
jfs
Developer
 
Posts: 2965
Joined: Mon Dec 19, 2005 8:18 pm
Location: Denmark

Re: Get exact values for animation of growing fonts

Unread postby Kyouma » Fri May 20, 2016 8:33 pm

Makes sense, thanks. But how could I do that when the scene with the logo darkens out at the end (still growing)?
User avatar
Kyouma
{\b1}
{\b1}
 
Posts: 13
Joined: Wed May 18, 2016 7:55 pm

Re: Get exact values for animation of growing fonts

Unread postby jfs » Sat May 21, 2016 12:27 pm

If the growth rate is constant, you could calculate the growth rate (e.g. pixels per second) and use that to extrapolate to the final size.

E.g. if the logo appears at time 0:40, begins fading out at 0:48, and becomes entirely invisible at 0:50, you could measure the size at time 0:40 and 0:48.
If you get the width at those times to 150 pixel and 310 pixel, you now know that it has grown by 160 pixel within 8 seconds, or 20 pixels per second. Since it continues growing for another 2 seconds, the final size at time 0:50 when it has become invisible must be 160 (pixels) + 2 (seconds remaining) * 20 (pixels/second) = 200 pixels.

Of course, since video frame times rarely fall on nice, round numbers, you have to calculate the times and time differences with decimals, meaning you will most likely also end up with non-whole pixel sizes. You'll just have to round off the final size you calculate, but keep using full precision until then.
Do not PM me asking for help with Aegisub, Automation, karaoke or anything like that, I won't reply.
Ask your questions in the public forums. Use the Search function, somebody probably asked the same question before.
All rights reserved to call you insults if you ask poorly thought out or redundant questions.
Experimenting is free and is a great way to learn things.
User avatar
jfs
Developer
 
Posts: 2965
Joined: Mon Dec 19, 2005 8:18 pm
Location: Denmark

Re: Get exact values for animation of growing fonts

Unread postby Kyouma » Sat May 21, 2016 3:17 pm

Thanks a lot for the help and reply ^^
User avatar
Kyouma
{\b1}
{\b1}
 
Posts: 13
Joined: Wed May 18, 2016 7:55 pm


Return to Typesetting

Who is online

Users browsing this forum: No registered users and 1 guest