Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize PNG files #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jtnicholl
Copy link

@jtnicholl jtnicholl commented Mar 2, 2022

I have optimized the size of the PNG files in the repository. I did the following:

  1. Remove alpha channels from files that don't need or use them. The fedora's displacement texture, the teeth texture, and a few AO and normal map textures had the unused areas set to transparent, this was unnecessary. Some textures also had alpha channels that weren't used.
  2. Ensure all the grayscale images are saved in grayscale format. Some of the AO textures actually had a bit of color in them, I assume by accident.
  3. Ensure the unused areas of the textures are a single solid, flat color. Several of the skin textures had some very noticeable JPEG compression noise in the unused areas, even though they were PNG files.
  4. Optimize all PNG images in the repo with Oxipng by running oxipng -r -s -o max .. This recompresses them more efficiently, usually about 20% smaller than the max compression option in GIMP, and strips any metadata that doesn't affect the image.

The largest gains were on the skin textures, followed by the clothes. About 28 megabytes total were saved. During step 3 I also removed the copyright notices from the litspheres and the skin textures. The litspheres still had AGPL listed, and the skins pointed to the old makehuman.org website. The former I simply removed, the latter I replaced with a smaller notice in the top right that points to the new makehumancommunity.org.

Also, slightly off-topic, but I noticed while editing the skin textures that almost all of them still have the male genitalia. The female genitalia were removed, I assume this was done back when the genitalia models were removed, but the male ones seem to have been left. I'm not sure if that's intentional. They're even present on the skin textures labeled as female. Removing them would save a bit more space, but I kept them. Except on the special suit textures, since they especially didn't make sense there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant