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

Drastically reducing blend file sizes by sharing common textures folder #144

Open
WilliamWoha opened this issue Nov 11, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@WilliamWoha
Copy link

This is my first time doing this, I hope I'm doing it correctly

Is your feature request related to a problem? Please describe.
Importing a map from Team Fortress 2 is rather simple: Unpack .bsp if necessary using bspzip, convert .bsp into .vmf with BSPSource, and then bring .vmf into Blender with Plumber. Everything works once it's figured out, but the sheer amount of textures used in individual maps makes it so separate blend files end up being very large, even though they're using the same textures.

Is your feature request related to a specific game? Please specify.
This is mainly for Team Fortress 2, though it may work for other games as well if they handle textures the same way. I haven't worked with other titles though.

Describe the solution you'd like
To drastically reduce file size, I imported the map, then unpacked all textures. They were all exported to the location the Blend file was saved at. This reduces the size of the .blend file from around 800-900 MB to less than 50 MB, and the textures all end up in that folder. Then I moved them to a new folder. Blender usually found them, but if not then I just did Find Missing Files.

For one map this doesn't reduce the total size of the map + textures, but for 10 maps, I keep moving the textures to that folder. If it's the same files then I just overwrite, and if they're not the same then they get added. So 10 blend files with 10 different maps take up less than 1.5 GB, as compared to the nearly 9 GB they'd take if they were all packed.

So the solution in simple steps would be to just unpack the textures automatically and move them to a predefined folder, which all future imports could refer to for seeing if the textures already being used are already there and if so, then just use that instead of packing into the .blend file. This folder could be present in the add-on settings or as a folder that can be chosen during import, or something like that, or maybe you folks can think of something better along the lines of this.

Most people wouldn't be used to this approach, especially if they've been using Plumber for a while now, but I think directly switching to this would help people in the long run as it saves plenty of space. Having this only be an optional feature might cause people to keep using packed blender files and not even know that this was an option.

Additional context
Nothing more to add, except that even now Plumber is amazing and thank you for creating it. I use Discord way more often than Github so I might end up missing messages or something, but I'll try to keep in check with this. Have a nice day!

@WilliamWoha WilliamWoha added the enhancement New feature or request label Nov 11, 2022
@lasa01
Copy link
Owner

lasa01 commented Nov 11, 2022 via email

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

No branches or pull requests

2 participants