jrevel Posted April 10, 2019 Report Share Posted April 10, 2019 I just saw that the sizes of the textures, especially PNG ones, are HUGE. There is an amazing tool called tinyPNG that can help us fixing that. It uses lossless compression algorithms to reduce texture sizes without losing quality. I tried it on some textures, and their size got drastically reduced : Applying it to all textures might be a great optimisation : lower loading time, but also faster rendering. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted April 10, 2019 Report Share Posted April 10, 2019 10 minutes ago, jrevel said: I just saw that the sizes of the textures, especially PNG ones, are HUGE. There is an amazing tool called tinyPNG that can help us fixing that. It uses lossless compression algorithms to reduce texture sizes without losing quality. I tried it on some textures, and their size got drastically reduced : Applying it to all textures might be a great optimisation : lower loading time, but also faster rendering. Hey, actually not really. All the textures are cached as dds file, using either DXT1 or DXT5 before getting into the game Package bundle comme with dds and not png But I might have not compressed that png yes. Quote Link to comment Share on other sites More sharing options...
elexis Posted April 10, 2019 Report Share Posted April 10, 2019 4.2MB -> 500KB is a lot. There is the drawback of requiring longer to decompress. Usually we already compress at highest lossless compression. If you mean https://tinypng.com/ it also uses 8bit instead of 24bit colors Quote This technique is called “quantization”. By reducing the number of colors, 24-bit PNG files can be converted to much smaller 8-bit indexed color images It says Quote TinyPNG uses smart lossy compression So that would not be lossless however. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted April 10, 2019 Report Share Posted April 10, 2019 It's probably good for someone to go through and standardize the texture sizes. 512x512 for a unit texture, for example, would be excessive. And then comparatively, it wouldn't make sense for a boar texture to be larger than a unit texture. No need for helmet textures at 512 if an entire unit is 256. Got to look at comparably sized items in the game world. A small vase should be 128. Etc. Judgments need made, but it would be good if artists made those judgments before they committed them. It's been better lately, but I am sure some stuff has fallen through the cracks. Quote Link to comment Share on other sites More sharing options...
Stan` Posted April 10, 2019 Report Share Posted April 10, 2019 43 minutes ago, elexis said: 4.2MB -> 500KB is a lot. There is the drawback of requiring longer to decompress. Usually we already compress at highest lossless compression. Indeed, yet it wouldn't change much in the game. The caching part where everything is grey might be slower, but after it's cached it will be using the dds and its mimaps. 29 minutes ago, wowgetoffyourcellphone said: It's probably good for someone to go through and standardize the texture sizes. 512x512 for a unit texture, for example, would be excessive. And then comparatively, it wouldn't make sense for a boar texture to be larger than a unit texture. No need for helmet textures at 512 if an entire unit is 256. Got to look at comparably sized items in the game world. A small vase should be 128. Etc. Judgments need made, but it would be good if artists made those judgments before they committed them. It's been better lately, but I am sure some stuff has fallen through the cracks. Yes. This is called texel density and it should be added to the Art Design document. Each type of objects should have a texture size depending on its size. The Art Design Document should be split into different wiki pages for new artists, and that might actually be a good theme for my presentation in the art school in Rennes in may. This is a daunting task though. I'd appreciate some help in that department. Were we to reduce texture size, original pngs should be put in the art repository. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted April 10, 2019 Report Share Posted April 10, 2019 Just now, stanislas69 said: Were we to reduce texture size, original pngs should be put in the art repository. Oh absolutely. Save everything. You never know what could be useful in the future. 1 minute ago, stanislas69 said: Yes. This is called texel density and it should be added to the Art Design document. Each type of objects should have a texture size depending on its size. Thank you! I figured there would be a name for the concept I was clumsily describing. Quote Link to comment Share on other sites More sharing options...
Stan` Posted April 10, 2019 Report Share Posted April 10, 2019 6 minutes ago, wowgetoffyourcellphone said: Thank you! I figured there would be a name for the concept I was clumsily describing. There is so much art related stuff to do that's not art ;( Quote Link to comment Share on other sites More sharing options...
fabio Posted April 10, 2019 Report Share Posted April 10, 2019 We already tried PNG lossless compression years ago. See this commit: https://trac.wildfiregames.com/changeset/16386 Notably the cursors went from 4+KB to 1+KB. Ideally it should be done before committing the PNGs to the SVN. If you rather recompress the PNGs already committed, the SVN bloats (including the checkout) because it still keeps the older PNGs (because SVN needs to let you access older revisions) as well the new ones. A better way to improve on game size (also reflecting in the final game download, not only on the source which has PNG but not S3TC textures) is to recompress the audio files, using a proper, updated ogg codec and sensible compression value. For some more info see this: 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted April 11, 2019 Report Share Posted April 11, 2019 Sound file recompression sounds a good job for @Samulis @Alexandermb can you use the png tool on your new textures to see if difference is visible ? Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted April 12, 2019 Report Share Posted April 12, 2019 We have a tool at Widelands that might be helpful: https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/utils/optimize_pngs.py 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.