Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Optimize file size  (Read 7265 times)

0 Members and 1 Guest are viewing this topic.

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Optimize file size
« on: February 22, 2009, 04:37:10 AM »

I have 15 scenes in and the file size is 188 mb.  This seems like a lot to me.  Any suggestions on cutting the file size down?  Have not promoted anything to packages yet.  Will that cut the file size down?   Any help is appreciated.  I'm using pngs for graphic images. 
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Optimize file size
« Reply #1 on: February 22, 2009, 04:48:50 AM »

When I promote the packages, the file size is 34.9 mb but I'm still interested in any ways to cut the file size down.  I have a whole lot more scenes to put in.
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Optimize file size
« Reply #2 on: February 22, 2009, 10:13:39 AM »

If you are using the best format for every job (jpg for backgrounds - except special cases -, png for sprites, ogg theora for videos & ogg vorbis for music) then I don't think there are much you can do except lowering the quality (higher compression) of those.
Logged
fl*p

Silverbristle

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 9
    • View Profile
    • Wisdomspiral
Re: Optimize file size
« Reply #3 on: February 22, 2009, 10:25:34 AM »

For png files there exists a program called pngcrush available here http://pmt.sourceforge.net/pngcrush/ for larger images the file size reduction can be quite noticable. It can be time consuming though. Its command line based.

An example of usage would be you have an image called 1a.png and you want to compress it further you would type.

pngcrush -brute 1a.png 1b.png

this would run through 124 methods and save the smallest filesize it found as 1b.png.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Optimize file size
« Reply #4 on: February 22, 2009, 10:27:31 AM »

Also don't include files that are not used. Some people generously include source photoshop files, for example, effectively multiplying the package size. Same for files that are no longer used, Word documents, backups and such.
180MB for 15 scenes sounds a bit too much, but it's hard to tell. It depends on resolution, number of animations, sounds, music tracks, videos etc.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Optimize file size
« Reply #5 on: February 22, 2009, 11:18:30 AM »

Also remember that the paths are all relative to the pack dirs your game is using... there is a tendency for people to forget that you can link to other areas of the project. If you have ANY files that are used in more than one place you just need to link to the old files. Examples of this is when using a shadow texture map for the 3d models. Or if you have generic windows boarders.... you can reuse this window data in ALL your windows.. no need to duplicate all those textures used in each window.

Just remember that if you nvr need to have more than one copy of any file in your project, as you can just link to the one that is already there rather than adding a 2nd file.


remember that if you nvr need to have more than one copy of any file in your project, as you can just link to the one that is already there rather than adding a 2nd file.

<----- EDIT

Tried that pngcrush thing.... after doing a brute force like sugested i got a 1.60799 meg png to a 1.607664 png.. hardly worth it really? While the same image with little visual quality loss as a JPEG is 0.107836 meg.

So...
Use jpegs they are smaller and look fine.
Use PNG ONLY if you need true grandiant alpha maps in sprites, if you can get away with colour masking (eg all pink is see though) then use that with JPG.
« Last Edit: February 22, 2009, 11:36:10 AM by Jyujinkai »
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Optimize file size
« Reply #6 on: February 22, 2009, 04:56:56 PM »

Cut down stereo audio files for effects or speech to mono, if you don't need them stereo. Remember, most sound sources are mono, anyway. And if you feed Wintermute mono audio files, it can place them according to the in scene position, making the loss of "real stereo" a benifit regarding "in-scene-stereo".
Logged
... delete the inner sleep ...

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Optimize file size
« Reply #7 on: February 23, 2009, 12:30:43 AM »

Thank you all for your comments.  Cutting some of the pngs to jpegs will help and I do have more than one picture in some cases so that will definitely help too.  I'll try all your suggestions.  Thanks again!  :  ) ::wave
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Akusa

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 46
    • View Profile
Re: Optimize file size
« Reply #8 on: February 23, 2009, 01:30:29 PM »

If you have dialog, maybe you also want to save the files in a lower bit bitrate.

For podcasts 64kbs at 44kHz is a very nice value with nearly no auditable quality loss in dialogs and a small loss in music pieces, so this could be a good value for dialogs.
At 96kbs and 44kHz still get a very high quality sounding music but it will lose some atmospheric impact in orchestration and chorus sounds because of the reduced emboss and hall. If i use my 40€ Subwoofer it is sometimes hard to difference the quality loss. So i would argue for a hobby or semiprofessional (speak: indie) release it a perfect fit.
« Last Edit: February 23, 2009, 01:35:29 PM by Akusa »
Logged

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Optimize file size
« Reply #9 on: February 23, 2009, 03:09:36 PM »

Thank you, Akusa.  I don't have dialogue right now but it's good to know.

So far have cut the size down to 171mb just by changing the background scenes from png to jpeg.  Working on the other ways to cut down.

Is it necessary to keep the background.bmp files for a scene once you've substituted one or does the engine somehow look for it?  That would clip off another 1mb.  :   ) ) )
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Optimize file size
« Reply #10 on: February 23, 2009, 03:40:39 PM »

Background.bmp is a placeholder file that you can remove.
Logged
fl*p

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Optimize file size
« Reply #11 on: February 23, 2009, 11:24:45 PM »

Thanks, am down to 159 mb and creeping ever downward.  :  ) )
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  
 

Page created in 0.041 seconds with 21 queries.