CoffeeStraw / PyonFX

An easy way to create KFX (Karaoke Effects) and complex typesetting using the ASS format (Advanced Substation Alpha).
http://pyonfx.rtfd.io/
GNU Lesser General Public License v3.0
145 stars 13 forks source link

Bézier curves for custom acceleration and non-linear movement #10

Open CoffeeStraw opened 4 years ago

CoffeeStraw commented 4 years ago

Standard acceleration for transformations is t^x. Be able to use Bézier curves to define custom accelerations of transformations would be very nice. An example of this concept could be found here.

Ideally, Utils.accelerate should be modified to implement this functionality.

UPDATE: Bézier curves should also be implemented to help in non-linear movements of text in frame per frame operations. Support to quadratic and cubic curves is the priority since they are the most used.

Youka commented 4 years ago

Going even further, there could be a whole set of acceleration operators. Adding gauss and sinus for example. Acceleration could be an object with operator (or function) as parameter for construction and just repeatedly passing t through a method afterwards.

fdar0536 commented 4 years ago

My implement is use SSE and AVX SIMD to accelerate it, but it only works on x86's CPU, other architecture just can run in regular code.

CoffeeStraw commented 4 years ago

My implement is use SSE and AVX SIMD to accelerate it, but it only works on x86's CPU, other architecture just can run in regular code.

I think you misunderstood the issue. This is about implementing a different acceleration method for transformations in ASS format (the standard is the one you use like \t(0,1000,1.5,\fscx120), where 1.5 is the value used for acceleration, to make animation follow an esponential curve.

fdar0536 commented 4 years ago

My implement is use SSE and AVX SIMD to accelerate it, but it only works on x86's CPU, other architecture just can run in regular code.

I think you misunderstood the issue. This is about implementing a different acceleration method for transformations in ASS format (the standard is the one you use like \t(0,1000,1.5,\fscx120), where 1.5 is the value used for acceleration, to make animation follow an esponential curve.

I got it, thanks.

moi15moi commented 2 years ago

Would it need to use FrameUtility? I don't see how you can do an acceleration with a shape without creating more than one line in .ass.