Hey all, I have been working on a unity project for a while and have been uploading it to github as I work. The .obj files are pretty big so I’ve been uploading them using LFS. I downloaded the project today to make sure that there were no problems, and I noticed that the .obj files seemed to be really small, so I loaded the project into unity only to see that the scenes were empty and none of the .obj files were loading properly, all showed up blank. Is this a problem with LFS/github or is there something I can do to fix it in unity?
LFS has been prone to corruption for me as well
Did you use a GUI to use this? For me GitHub desktop is quite stable with LFS, GitKraken corrupts easily.
Plastic is a godsend for large files from my experience, but that depends on the project size and team
did you check the .obj file contents, whats inside? (using text editor)
I am just using git in terminal to upload everything, could that be the problem?
I just did and this is all that was in the downloaded obj file:
version https://git-lfs.github.com/spec/v1
oid sha256:4ad87287be8100e6571ab37b692e3f000dd73e98d42529ab93de188b85bf7b0a
size 637440243
OBJ is an unfortunate extension. While I get what Lightwave was thinking (“Hey, it’s an Object!!”), they really should have known better because OBJ was long-established as an interim compiled module file format suffix.
Because of this, OBJ is often globally ignored by toolchains, or ignored by global ignore files, or generally interfered with at many different levels of operation, including being quarantined by over-zealous anti-virus / anti-malware programs.
Those are all things to check. ALSO, generally the OBJ file isn’t gonna be a big file, so not a great candidate for LFS… yes, it could be if you have a massive complex high-vertex object in there, but usually the textures used on such an object would be still-again larger.
Usually the only things worth putting in LFS are long audio files (music) or giant source textures such as original PSD files. Otherwise just source-control it normally and be done with it.
Some folks make and bake and source-control the huge EXR lighting files, but I would argue that has limited value and would be better accomplished by rebaking at build time or at clone time.
When (and if) your repo gets too big, archive it, make a new repo and copy over the tips of your main branches. You start a fresh with a nice small repo and you still keep the old one in case of having to go back forensically and find older stuff.
that seems like git lfs is not downloading the actual files (just the pointers),
you get that issue also if you download repo from github (without lfs).
SourceTree has special menu Repository/git lfs/…
to do some specific stuff like init, pull lfs…