0

As you all know, there is a compression option when saving blend files in Blender.

I tested to commit the changes to GIT with a blend file consisting of 50 torus with 3 subdivisions applied. I thought uncompressed files would be much more efficient when using GIT, but regardless of whether they were compressed or not, the growth rate of the git folder was similar.
I don't understand this result very well.

I want to hear your experiences. Do you want to compress blend files when using GIT? Or would you like to uncompress?


After reading @HikariTW's answer, I carried out a more precise test. As a result, I realized that I had been mistaken. GIT wasn't just picking and saving changes to the blend file, it was just storing copies of the blend file every time it made the version. Blend files are treated as binary files, so it's natural. However, because GIT compresses and stores copies of the blend file, the size did not double. Because I didn't know that GIT was compressing when I created the version, I was mistaken for GIT to pick up only the changes in the blend file and store them in the version.

As a result, I recommend using a compressed blend file as @HikariTW said. When you commit a uncompressed 100MB blend file, GIT compresses it, makes it 33MB, and adds it to the .git folder. But if you compress and store a 100MB uncompressed file in the blender, it becomes a 33MB blend file, which is committed by GIT to compress it one more time, make it 27MB, and add it to the .git folder, so you can keep the storage smaller.

brockmann
  • 12,613
  • 4
  • 50
  • 93
J. SungHoon
  • 2,196
  • 11
  • 36
  • What? You can use GIT on blend file? Is there a blend decoder version of GIT? How does GIT or that version control core know where is the difference? Take a step back, how did you except GIT will do for your blend file? Should it track change made in that file? – HikariTW Aug 12 '20 at 08:07
  • 1
    And what if you just use Blender build in my_donuts.blend.001 logging style save feature and ignore those file in your gitignore? Wouldn't that be more reliable without increasing the size of repo? – HikariTW Aug 12 '20 at 08:15
  • @HikariTW I tested using the source tree. And the target I want to manage is a 3D animation project in which blend files, psd files, and sound files are organized in a folder tree. Until now, I have manually copied and renamed the files to version control. However, that method messed up the link relationship between the blend files and the file size became huge at a fast speed. So I want to use GIT(Source Tree) for my project. – J. SungHoon Aug 12 '20 at 08:20
  • 1
    I still don't get it. Why you use GIT (that GIT) on a binary file like .blend file? There should be bunch of articles tell you Never commit binary data into GIT. with thousand of reason. Could you explain why you need a distributed version-control system with your project? If you want only back-up, using any cloud drive with auto-upload would be a better option – HikariTW Aug 12 '20 at 08:25
  • 1
    Or you can check out binary diff to make different only commit to GIT (still not a good idea). Since I don't think .blend file will be stable enough to make GIT repo small. – HikariTW Aug 12 '20 at 08:30
  • 1
    https://stackoverflow.com/questions/540535/managing-large-binary-files-with-git, https://superuser.com/questions/715690/can-i-use-git-to-version-control-psd-files-and-maya-projects – HikariTW Aug 12 '20 at 08:40
  • @HikariTW Oh, thank you. That sounds like a new view to me. I guess I need to explore more of the methodology for backup and collaboration for 3D animation projects before looking at GIT. If you have any keywords or links to search, please recommend them to me. – J. SungHoon Aug 12 '20 at 08:46
  • 1
    GIT is a version control system, Source Tree is a GUI interface using GIT. GIT is not the only version control system, GitHub is a website like dropbox with GIT control system. You can search binary file or project file with GIT keyword, there should be a lot of version control system based on GIT and make .blend file controllable without saving every single committed .blend file. – HikariTW Aug 12 '20 at 08:52
  • 1
    Possible dup of this post: https://blender.stackexchange.com/questions/108115/version-control-for-blend-files – HikariTW Aug 12 '20 at 09:07
  • Please do not add manual line breaks to the question body after each sentence, makes it hard to read on non-mobile devices, thanks. – brockmann Aug 13 '20 at 07:04

1 Answers1

1

Back to your title's question:

Compress vs Uncompress file into version control system?

Use compressed if the system can not create a differential

Most version control systems have their own compress algorithm when storing each file. Using Blender's compression will only confuse the system on file content and unable to find a minimum diff between different versions of files which may lead to massive amount of savings in your repository.

While some systems using .gz or other common compression methods, .blend files are most likely treated as binary files unless there is a toolchain to let the system decode the meaning of Blender's files. So an uncompressed .blend might be treated as a compressed one, then choose the smaller one since Blender's compression is specifically to it's own file type.

brockmann
  • 12,613
  • 4
  • 50
  • 93
HikariTW
  • 7,821
  • 2
  • 18
  • 37