Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Optimizing filesize through imports and map optimizers

Discussion in 'General Mapping Tutorials' started by ikillforeyou, May 20, 2010.

  1. ikillforeyou

    ikillforeyou

    Joined:
    Jun 10, 2008
    Messages:
    1,340
    Resources:
    33
    Models:
    22
    Icons:
    9
    Packs:
    1
    Tutorials:
    1
    Resources:
    33
    Optimizing map filesize through imports and map optimizers

    Optimizing your map through imports and map optimizers.

    Tools needed:


    Guesst's .mdx squisher​

    Vexorian's map optimizer​

    Mdlvis English​

    Blp Lab​

    Optional for good modelers, and for any .mdl editing.
    Warcraft 3 Model editor​


    Optimizing models via tools (requires minimum modeling knowlege)

    Choosing your map.


    I'll be selecting "(8)FunnyBunnysEggHunt.w3x" for my optimization, as it includes imported models, and lots of script, for the sake of the tutorial, you should too.
    It's path is "Warcraft III\Maps\FrozenThrone\Scenario\(8)FunnyBunnysEggHunt.w3x"

    The import manager


    The import manager is by far one of the most important aspects of this tutorial, it's where all the imports that need optimizing are located, here's a screenshot of what mine looks like.
    Import manager screenshot
    [​IMG]

    As you see, it has a lot of imports, 109, totaling 3,713KB OPTIMIZED We'll try to bring this down, as this is the main cause of the filesize on this map.
    Exporting all models is as right clicking, then after making a folder, selecting the made folder and exporting all to it, i've named my folder "BunnyExports"
    [​IMG]


    The filetypes and optimizers for each


    The filetypes in this archive should only be .mdx, .blp, .mp3, .wav, .mdl, .j anything other then that you can delete.

    The main filetypes we're going to be focusing on is .mdx, and .blp, but a bit of .mdl

    Now, this is usually how i do things:
    Mdx/l editing for good modelers.

    I have to go to magos model editor and look at all the textures, if there's duplicates, delete (only one texture at a time), then, if some parts of the model turn black, I go to the materials section and find any materials with None as the material and switch it for the texture who's duplicates I just deleted, then I repeat this several times until there are no duplicates.

    Converting .mdl to .mdx

    It's as simple as opening it in War III Model editor, and pressing "Save as, .mdx"


    Execute MDLVIS.

    It should look like this:
    [​IMG]
    If you get an error like "Storm.dll couldn't be found" go to your Warcraft III Directory and copy it over into the folder of the mdlvis .exe

    Now, drag and drop the first .mdx model in the stack into it, i'm going alphabetically, so for me it's "BunnyPeep0.mdx"

    And go to the "Optimization" tab, followed by "Optimizer"
    Here's a list of what the options do.
    Canonization: Deletes all mdlvis info privately made, if you haven't edited the model with this edtior don't bother with this one.
    Delete repeat geosets: For wow models only, don't check
    Delete free vertices: Deletes unused verteces without any triangles going to them
    Delete free bones: Deletes unused bones, without any child bones attached or any vertices attached.
    Delete "floating" KF: Movement in bones is stored in frames, if these frames are outside of an animation they take alot of filesize, almost certainly check this
    Linearize animations: This one's a bit more complicated, so this is the rundown. There's 3 basic animation settings, "Hermite", "Bezier" and "Linear" Hermite and bezier take about 3x more space then linear, but they're alot smoother, changing to linear can reduce filesize greatly, but it makes some animations more choppy
    Increase compressibility: This just optimizes the model, it basically does the same thing as Guesst's mdx squisher, but it doesn't do it as well (my experiment) (Don't check)

    Select the options you want, then click "Optimize" and then "File>Save" this ought do bring the filesize down a bit.

    Options i checked: Canonization, Delete repeat geosets, delete free vertices, Delete free bones, Delete "Floating" KF, Linearize animations

    Original filesize: 17 KB, finished filesize: 14 KB, this may not seem like much, but most of this model's filesize isn't in animations, if you were to do "EasterBunny.mdx" with the same options you'd get this: Original F/S. 170KB
    Optimized F/S. 80KB that's almost a 50% drop!

    Guesst's file optimizer is a bit complicated, all i usually do is just put the model i put through mdlvis right into it, make sure you don't open it with any editors or it will get "un-optimized" and you'll need to do it again, but i usually delete the original and get rid of the _squished suffix it adds.

    This won't add a noticible change in filesize, but it will change it's filesize in the map, usually around 30-60%

    After doing this for every model, you can optimize the textures.

    Optimizing textures with BLP Lab


    To optimize skins, open the first file in the folder, then press Cntrl + S, and select the file, and it will come up with a dialog

    Leave mipmap count at 10-20, i don't have very much experience with mipmaps.

    Set the compressed to how much you want, usually around 40-80%, it can be lower for skins.

    Don't forget you can use the arrows to move to the next picture file in the folder.

    This program also has an easy batch optimizer, but as far i can can tell, there's no way to say how much you want optimized.

    Go to tools>Mass optimizer, F8, and select your folder you exported everything to Optimize.

    Final note:

    There's specific texture paths required for them to work properly, usually it's like ReplaceableTextures\CommandButtons\BTNEasterWabbit.blp
    If you delete and re import the icon the path will be set to
    war3mapImported\BTNEasterWabbit.blp, there's a problem with that because it won't work in all the places it's used, so you should take a screenshot, or two of all the imports and then set the import paths to what they were.

    Common import paths: Copy 'n' paste
    ReplaceableTextures\CommandButtonsDisabled\DISBTN
    ReplaceableTextures\CommandButtons\BTN
    Textures\
    blank

    Using Vexorian's map optimizer


    I won't be going into much detail with it, because there are a lot of tutorials for this editor already, not to mention a 60KB Readme, which can be located right next to the exe, called "README.html"

    The main thing about this editor is that if you select "Remove as much WE-only data as possible" it WILL not be able to be opened by your editor anymore!

    MAKE SURE YOU HAVE A BACK-UP OF YOUR MAP BEFORE USING THIS TOOL!



    With this tutorial you could possibly be able to reduce your map's filesize by 50%, I've actually gotten this result with one of my maps.

    Sound optimization


    I don't have any experience with using a sound editor, but PurgeandFire111 mentioned to use this tool to optimize sounds (Thread linked)
    http://www.wc3c.net/showthread.php?t=96358

    Thanks to D4RK_G4ND4LF for mentioning me to use blp lab.
     

    Attached Files:

    Last edited: Sep 26, 2010
  2. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    You should also mention how to use a program like Audacity to reduce the bit rate of sounds (which can definitely help maps that use sounds), especially since sounds take up a lot of space. (Well, unless you use .midi but wc3 doesn't support it unless everyone playing a map does a special technique [described in a tutorial on wc3c]) This thread might be useful as well.

    Otherwise, nice job. If you add that and fix the whole [h4] thing not showing up I'll approve it.
     
  3. ikillforeyou

    ikillforeyou

    Joined:
    Jun 10, 2008
    Messages:
    1,340
    Resources:
    33
    Models:
    22
    Icons:
    9
    Packs:
    1
    Tutorials:
    1
    Resources:
    33
    I don't know anything about optimizing sounds, or sounds themselves for that matter, =\

    can i just post a link to his tutorial?
     
  4. M0RT

    M0RT

    Joined:
    Apr 15, 2008
    Messages:
    1,067
    Resources:
    6
    Maps:
    3
    StarCraft II Resources:
    1
    Tutorials:
    2
    Resources:
    6
    Reducing something by 100% would be reducing it's size to zero. You mean reducing to half, which is by 50% :grin: (you use it 2 times)
     
  5. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Okay, I guess that is fine. I'll approve it.
     
  6. mikeisman2

    mikeisman2

    Joined:
    Mar 29, 2008
    Messages:
    38
    Resources:
    0
    Resources:
    0
    To optimize sound you will want to convert the file size down so dependent on the quality of the mp3 or what ever sound file type your using you will be trying to lower the kbpsfor example sound cloud runs 128kbps for most of the songs on the site what happens is when a song is uploaded it is converted down to this range this is so they minimize file size on their databases to allow for a more seemless use of the website or application. now based on the original kbps of the original file (recommending you use a high quality file before converting) you can convert down from their but you lose wave lengths and quality of the song anything below 56kbps will make the song sound choppy. But minimizing the actual file size will go hand and hand with this cause this is in turn the quality of the song but it actually refers to the wave length capacity of the song but what takes up the size of the file wavelength capacity so yeah just dont go below 56kbps you should be able to find a decent converter on the interline www's (internet "searchGoogle") for free! i dont have any recommendations for one but im working on a map so ill probably post a whole tutorial when i get that far!
     
  7. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    @Mikeisman2:

    I use audacity with LAME to handle my conversions and to lower the bit rate. If you do end up submitting a tutorial on optimizing sound files, then that is definitely one to consider. :)
     
  8. mikeisman2

    mikeisman2

    Joined:
    Mar 29, 2008
    Messages:
    38
    Resources:
    0
    Resources:
    0
    Audacity is ok but have several years exerience in audio engineering and access to high quality tools I use flstudio which lets you convert down to any size and bit rate and reduce clipping and compress the file before actual conversion I may put up a solid tutorial on this and I can go through different tools and how to use them but it won't be anytime soon if anyone needs help with audio compression and optimizing sound files just tell them to message me for now but I won't put up thourogh tutorial going through standard file types and the required ones for wc3 for a bit!