Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

oxmaulmike2581/SFTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SFTool

Tool for working with models from Sketchfab


This tool is officially deprecated. No more updates or support.

This is caused because every day the number of models stored in binz format is growing rapidly.
I know about all methods to convert .binz back to .osgjs/.bin, but I don't want to use it.
I don't want to add methods that execute code from the browser, whether in the user's default browser or in a sandboxed one.
A time ago I didn't find any documenation about structure of .binz format, so I can't make a proper parser.
Understand me, all these methods with launching separate browsers, transferring data from one application to another, and combinations of utilities that are different in their original purpose are terrible crutches that can only be used as a temporary solution.
So I decided to officially stop the support of my tool and mark it as archived.
I have not received any requests to stop development or remove the utility, and I hope I never will.
You can continue to use my utility however you want, but I cannot guarantee that it will work. Its code is open, so if you want to improve it - your time has come.
This was and remains my first serious application and experience in their development, and I want to move further in this direction.
I will not leave links to similar software here, but I assure you, it is easy to find it through Google.

At the moment, only downloading models is supported. In the future, it may be possible to add support for converting to Autodesk FBX format.
If you want to download all models of specified author, first you need to get the list of model uids. You can do that using my second tool named SFUserParser.

Usage:

  • SFTool.exe -h model_hash -o output_dir
  • SFTool.exe -l links_file -o output_dir

Arguments:

  • -h:
    Model hash or whole link.
  • -l:
    Path to the file with list of links to batch download.
  • -o (optional):
    Path to the output directory. If does not specified, the current directory will used.

Requirements:


Notes:

The BINZ format is new to Sketchfab. It looks like it's just an additional layer of encryption on top of the existing OSGJS and BIN files instead of GZip compression. Work is underway to study it and create a decoder, but it is too early to talk about the timing of its implementation.

I know about many scripts and utilities similar to mine, including those that are somehow capable of bypassing the .binz format. Unfortunately, so far not a single author has been able (at least publicly) to draw up a specification of this format. Add scripts for browsers or separate ready-made .exe / .py / etc. in my utility I do not want. From the point of view of an integrated approach, the best solution would be to add a full-fledged parser for both binz and osgjs formats.

To import the downloaded model, look for the Blender script on Google. Perhaps later, when I implement the conversion of the model into an editable format, this item will be removed.

This is my first serious application in C#, so the code can be crappy in places or not fully optimized. I originally wrote it for .NET 5.0, but later decided to switch to .NET Framework 4.7.2 for better compatibility.


Thanks:


Changelog:

1.0.0.4:

  1. Another fix for BINZ downloading (previous fix wasn't work correctly, sorry about that)

1.0.0.3:
  1. Fixed saving error when trying to download a model in the new encrypted BINZ format
  2. Added a warning if the downloaded model is in BINZ format

The BINZ format is new to Sketchfab. It looks like it's just an additional layer of encryption on top of the existing OSGJS and BIN files instead of GZip compression. Work is underway to study it and create a decoder, but it is too early to talk about the timing of its implementation.


1.0.0.2:
  1. Replaced the exception with the message to the console, in the case when the output folder already exists
  2. Removed waiting for pressing any key after processing the model
  3. Added a greeting logo
  4. Added help when called without arguments instead of exception
  5. Added 3 modes of operation:
    • with the "-h" key: one link or hash of the model;
    • with the "-l" key: path to the file containing the list of links and / or hashes (one per line);
    • by the presence of the file "sftool_links.txt" in the folder with the program, this overrides the two keys above and automatically activates the batch mode;
  6. Changed the default namespace, now it matches the name of the output exe file
  7. Moved the project files to a separate folder so that there is no mess after the build
  8. Updated version of the program
  9. Removed unnecessary files and folders in the repository
  10. The work on the parser of the OSGJS format has begun (it will appear in the next versions)