forum

osu! Asset Stretcher

posted
Total Posts
4
Topic Starter
redoverture
I've found that a lot of skins have assets at different animation rates than others. While trying to use follow points from one in another, I realized they flicker due to the old skin having AnimationFramerate at zero.

I solved this by writing a Python script to stretch out an asset with fewer frames into copied files for a higher animation rate. Obviously it doesn't actually mean the animation is higher framerate (it's the same as before), but now it won't flicker!

Here's a link to the code if you want to use it. Needs Python 3.6+. Change the variables at the top of the file to point to your input, output, animation rate, and file prefix. The script does the rest of the heavy lifting - no more copy and paste.






Here's the script:
https://github.com/redoverture/misc/blob/master/osu/stretchfollowpoint.py

Let me know if it works or doesn't!
RockRoller
Just having the same amount of frames is not all there is to animations in skins. Does this program consider the AnimationFramerate of the skin.ini?
Topic Starter
redoverture

RockRoller wrote:

Just having the same amount of frames is not all there is to animations in skins. Does this program consider the AnimationFramerate of the skin.ini?
Yes, exactly. Line 16 `animation_rate = 60` can be modified. The script then makes copies of each frame to correctly interpolate a higher framerate.

The purpose of the script is to allow you to use lower framerate assets in higher framerate contexts. So, it won't appear to be a higher framerate of course, but the script will make it so that it at least appears normally.


So, for example: the new skin I wanted to play with is AnimationFramerate 60. It doesn't include follow points. My trusty old skin does, but it's getting clunky. Problem is that follow point animation is only 4 frames. If I just drag it into the new skin folder, it flickers 60/4=15 times per second. Not pretty to say the least.

The solution, then, is to copy followpoint_0 15 times, naming each copy followpoint_1, followpoint_2, etc. Then copy followpoint_1 and start the names from 16.... no one has time for that. Here's where the script is useful.
RockRoller
So you need to manually declare the AnimationFramerate, would be better if the script would just read it from the skin.ini.
Also, if I see this correctly, if you can not fit the old animation into the new one evenly you are just duplicating the last frame till it fits? That seems like a bad way to solve things, since that would mess up animations
Please sign in to reply.

New reply