facebookincubator / FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.
Other
2.1k stars 332 forks source link

Max input file size #235

Open ggriffon opened 5 years ago

ggriffon commented 5 years ago

Hi,

I am trying to convert a fbx file which size is 2.1GB.

Console returns: FBX Model: File does not exist:

zellski commented 5 years ago

Yikes. Hmm. This might be operating system dependent. Is this on PC? I’ll admit I’ve never tested against such a large file. 2 GB is a common limit (2^31). There are various reasons 32-bit limitations in glTF as well, though it seems clear this error happens before we get that far.

ggriffon commented 5 years ago

Yikes. Hmm. This might be operating system dependent. Is this on PC? I’ll admit I’ve never tested against such a large file. 2 GB is a common limit (2^31). There are various reasons 32-bit limitations in glTF as well, though it seems clear this error happens before we get that far.

yes it's on Win 10 x64

zellski commented 5 years ago

OK, I'll try to give this a whirl when I can. Meanwhile could you work around it by exporting without embedding media? I assume it's largely textures that's taking up so much space.

ggriffon commented 5 years ago

OK, I'll try to give this a whirl when I can. Meanwhile could you work around it by exporting without embedding media? I assume it's largely textures that's taking up so much space.

Thank you, there is actually no texture it's a huge model of a building.

VincentSchmid commented 4 years ago

I have the same issue, on wsl it worked. Any update on this?

ggriffon commented 3 years ago

I was able to get the file processed after updating a few lines to use boost to do the file exists check. In CLI11.cpp line 1159:

struct ExistingFileValidator : public Validator {
    ExistingFileValidator() {
        tname = "FILE";
        func = [](const std::string &filename) {
            if (!boost::filesystem::exists(filename)) {
                return "File does not exist: " + filename;
            } else if (boost::filesystem::is_directory(filename)) {
                return "File is actually a directory: " + filename;
            }
            return std::string();
        };
    }
};