forum

pl0x - Skin Filesize Optimizer Tool / HD&SD Generator

posted
Total Posts
12
Topic Starter
prank855
I've created a tool using bash and other binaries to optimize skins for skin creators for smaller download sizes.

I'm releasing this because I see all these huge skins, or even small ones, that can be greatly reduced in size through optimization and light compression, but are not.

This tool will: Optimize Images, Optimize Audio, Create HD/SD, HD, and SD exports, apply high zip compression, and creates HD and SD assets when either or aren't found using Lanczos upscaling/downscaling.

Prerequisites
The caveat of this tool is that you need a few things installed for Windows for this to work properly.
You will need:
Windows OS
Git for Windows (https://gitforwindows.org/)
All of the other binaries are included, such as: pingo (https://css-ig.net/pingo) and 7-zip (https://www.7-zip.org/), ffmpeg, imagemagick
Download the tool here

Instructions
  1. Place your skin(s) ".osk" into the /input/ folder
    NOTE: Rename skin file if it has "special" characters for compatibility.
  2. Run "Run.sh" with Git for Windows
  3. Wait until completion all should go well if you've properly installed the right programs.
  4. You will find HD/SD, HD, and SD in /output/skinname/

    Note: There is only light compression on JPG and MP3, should not be noticeable. Bit-depth of png's are reduced, again, not noticeable.
Thank you for the download. And let me know if there are issues that went over my head, incompatibilities, etc. Otherwise, this should help many skins file sizes.
h3oCharles
Lanczos upscaling? Why not waifu2x?
Topic Starter
prank855

h3oCharles wrote:

Lanczos upscaling? Why not waifu2x?

Because waifu2x is trained on anime-styled art. I also don't want to train it with practical assets. And its a pain to run. Lanczos just works well enough. <3
RockRoller
Relying on so many external sources can be a problem, especially with ImageMagick. A few older tools for skinning don't work anymore thanks to an imgaemagick update.

Also, why would anyone upscale from SD to HD anyways? You should never ever skin in SD.
Topic Starter
prank855

RockRoller wrote:

Relying on so many external sources can be a problem, especially with ImageMagick. A few older tools for skinning don't work anymore thanks to an imgaemagick update.

Also, why would anyone upscale from SD to HD anyways? You should never ever skin in SD.


From what I have seen, ImageMagick has only had changes to how it processes images behind the scenes, affecting the dll, causing problems for those old programs and can't access the new dll correctly with the api they use. I've only used straight cli scripting, which personally I do not see them changing sytax any time soon. If they do, I'll happily post a fix or people can just downgrade to a compatible version relative to when this was posted. The same goes for ffmpeg, just straight cli, the others I included simply because the filesize of them was relatively smaller compared to ffmpeg/imagemagick being quite large in nature.

I upscaled with lanczos for two reasons: I'm assuming this is better if not equal upscaling to what osu already does, and it works better with how I have written my script.
You are right saying no one should skin in SD, but it's still safe to assume an older skin may be ran through this, or simply is missing some HD assets from skin mixing or other reasons.
marshallracer

RockRoller wrote:

Also, why would anyone upscale from SD to HD anyways? You should never ever skin in SD.

You don't need to skin in HD if one doesn't really care as long as one's happy with their skin tho consider this only relevant to personal skins. Still I think it's not wrong to have SD variants if people prefer them for whatever reason

I'd cry out loud for sources to try to make myself a linux version but I'm scared about the amount of external resources
Works fine on windows tho as far as I have tested it
RockRoller

marshallracer wrote:

You don't need to skin in HD if one doesn't really care as long as one's happy with their skin tho consider this only relevant to personal skins. Still I think it's not wrong to have SD variants if people prefer them for whatever reason

Even personal skins should be made in HD. Most people that use SD resolutions are using them because they are using a laptop or old monitor. But it would be good to have a HD version in case you ever gonna upgrade. And yes, I guess it shold be fine aslong as people are heavy, I might be a bit too nitpicky about quality.
h3oCharles
I just tested this, it uses no interpolation for upscaling
you lied to us REEEEEEEEEEEEEEEE
Topic Starter
prank855

h3oCharles wrote:

I just tested this, it uses no interpolation for upscaling
you lied to us REEEEEEEEEEEEEEEE


I submitted a fix. I honestly did not do any unit testing with the upscaling portion as I personally never had a need for it, and I forgot to add blur/sharpen settings to that operation. Should be ready now. Upscaling will never be the same quality as if the asset was already at enlarged dimensions, but it still will do an alright job otherwise. soz
h3oCharles
yup, I used SSBNRHCWNv3 on it and it looks much better than SD only. thx m8!
Topic Starter
prank855
Updated the tool to search for files recursively instead of surface level skin files. Example would be skinners using folders to organize mania elements, etc. Before it would not reach those files. Also added all required binaries to the download, so all you need is Windows and Git for Windows. Let me know if anything breaks, or if you have any improvements you want to see with the operation of the script or general code improvements.
show more
Please sign in to reply.

New reply