Unoffical Frontline patch to save a lot of data space.

Discussion in 'Tutorials & Resources' started by Lampenpam, Sep 3, 2017.

  1. Lampenpam

    aa Lampenpam

    Messages:
    995
    Positive Ratings:
    329
    Hello, folks.
    The Frontline pack is quite a big one: over 800MB worth of data. But I noticed that a couple of textures aren't compressed and that some have an unecessary alpchannel and so I thought that I might be able to reduce the file size of the pack without any visual downside.

    So I went through the files and changed every texture that could be reduced in size without changing it's visual appearance. So what I did was:

    1: Compressing textures which had no compression.
    Some textures were saved in the BGR888/BGRA8888 format, a loseless but big format. By changing them to the compressed DXT1/DXT5 format massivly reduced their size. While DXT is a "lossy" format, it does a brilliant job at keeping the visual quality while reducing the file size of the texture greatly. You won't notice any differences.
    A few uncompressed textures were even over 10MB big, but compressed only around 1MB!

    2: Removing the alpha channel from a texture if the alpha channel isn't used.
    A lot of textures have an unecessary alpha channel. When saving a texture in DXT5 or BGRA8888, the format saves not only three color channels, but also an alpha channel, which is used usually for transparency but also other effects.
    Appearently plenty of textures had an blank alpha channel saved and didn't made use of something like $translucent, $selfillum, $basemapalphaphongmask, $blendtintbybasealpha, or anything that requires the alpha channel to work.
    So I changed the format of these textures from DXT5 to DXT1, a format that doesn't save an alpha channel and halfed the size of the files!

    Results:

    The material folder of the frontline pack is 770MB and after applying the patch, only 573MB. so I managed to reduce the size by a whopping 200MB (~25%) without changing the visuals of anything!
    If we exclude the materials/models folder, the size of the textures were changed from 463 to 276 MB, that's 40%!
    This is because most of the model materials were done correctly, are really high quality and made use of a lot of shader effects that use alpha channels. So there wasn't much to improve.

    Now, I havn't asked anyone for permission to edit the assets and therefore won't upload it to this website. But I would like like to share this patch with you, because I believe some of you will appreaciate this option to make this big asset pack a bit lighter. I'm not looking to be credited, I'm just happy when people are happy about shorter downloads.

    Download: http://www.mediafire.com/file/mpr3ike40xo1w33/unoffical_frontline_patch.rar

    The patch only includes edited VTFs, so download the Frontline asset pack first, then overwrite the assets with the one from the patch.

    I hope you guys will find this usefull to save some disk space and reduce the size of your maps.
     
    • Like Like x 9
    • Thanks Thanks x 6
    Last edited: Sep 3, 2017
  2. ics

    aa ics http://ics-base.net

    Messages:
    654
    Positive Ratings:
    410
    This is something that should be looked more into in the first place. The mayann pack too had very big material files too among other things and filesize bloated quickly on maps if a lot of those were used. Good job.
     
  3. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    Curious if converting those DXT5 textures to DXT1 caused the other channels to "recompress" like loading and re-saving a JPEG, or if there's a way to do it without loss of data.
     
  4. iiboharz

    aa iiboharz Meme Queen

    Messages:
    700
    Positive Ratings:
    1,025
    • Agree Agree x 1
  5. Lampenpam

    aa Lampenpam

    Messages:
    995
    Positive Ratings:
    329
    Naturally it would be better if the authors of each textures could just compile their texture in the right format again. While you will hardly see any difference at all, it still is the case of recompiling a compressed texture to a new compressed texture.
    This is why this pack will better stay unoffical and won't be directly implemented. Who ever is responsible for the pack could try to notify all authors of every texture to compile them in a better format, but I wonder if they all will even bother to do so.
     
    • Agree Agree x 1
  6. EArkham

    aa EArkham Necromancer

    Messages:
    1,555
    Positive Ratings:
    2,158
    • Thanks Thanks x 1
    • Agree Agree x 1
  7. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    This is probably the main reason the pack hasn't been updated to fix these issues despite multiple people chiming in about them. A word to the wise for the future: If someone organizes a major asset pack like this and plans to update it post-release, they should probably ask for the source files in case something needs fixed and the artists can't be reached. You never know when it could be something more serious than wasted space.
     
    • Agree Agree x 2
  8. Crash

    aa Crash func_nerd

    Messages:
    3,074
    Positive Ratings:
    4,563
    Everyone is still within communication reach from the Frontline team. It's more a matter of motivation when everyone has their own projects they are working on, especially with Halloween coming up. We've discussed this thread, though. It'll be looked into.
     
    • Thanks Thanks x 1