Variable Animation Framerate
Posted: Fri Oct 06, 2017 11:58 pm
What?
For all types of animations and working_visualizations it would be nice if it was possible to specify the duration (in ticks?) that each frame is displayed. This would make it possible to have looped animations that have a pause/slowdown in the work cycle. For example a smeltery could have a long phase (4 seconds) where it slowly heats metal, which maybe only requires a new animation frame once per 60 ticks. But at the end of the operation the fluid metal is poured into casting basins which requires a faster animation of e.g 1 frame per tick for 60 ticks.
Currently this can only be achieved by having a total of 5*60=300 frames of animation where the first 240 frames are mostly exact copies of the previous one (60 copies of the first 4 frames each).
How?
With variable speed support it would be possible to only have 64 unique frames and define the time they are displayed like this:
Or more akin to video timestamps as a per-frame list:
Why?
The point of doing this would be to allow animations with very long cycles without the increase in file size and memory usage(?) caused by large amounts of copied frames.
Edit:
I just noticed pyanodon has posted an example animation that demonstrates well the kind of "pulsed" animation that would benefit from this.
For all types of animations and working_visualizations it would be nice if it was possible to specify the duration (in ticks?) that each frame is displayed. This would make it possible to have looped animations that have a pause/slowdown in the work cycle. For example a smeltery could have a long phase (4 seconds) where it slowly heats metal, which maybe only requires a new animation frame once per 60 ticks. But at the end of the operation the fluid metal is poured into casting basins which requires a faster animation of e.g 1 frame per tick for 60 ticks.
Currently this can only be achieved by having a total of 5*60=300 frames of animation where the first 240 frames are mostly exact copies of the previous one (60 copies of the first 4 frames each).
How?
With variable speed support it would be possible to only have 64 unique frames and define the time they are displayed like this:
Code: Select all
--start frame, end frame, ticks each frame is displayed.
frame_times = {
{1,4,60}, --first four frames are shown 60 ticks each
{5,64,1}, --last 60 frames are shown 1 tick each
}
Code: Select all
frame_times = {60, 60, 60, 60, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
The point of doing this would be to allow animations with very long cycles without the increase in file size and memory usage(?) caused by large amounts of copied frames.
Edit:
I just noticed pyanodon has posted an example animation that demonstrates well the kind of "pulsed" animation that would benefit from this.
Image