Jump to content

End of File and seek position outside of file bounds


Go to solution Solved by Josh,

Recommended Posts

Posted

The zip file above only includes one file, an .ultra map file. I will need the glTF files in order to investigate this (along with their .bin files and textures)

Let's build cool stuff and have fun. :)

Posted

What you can do is open the model in the asset editor, then select the File > Save As option and save a glTF to the desktop or in another folder somewhere, then zip those files up.

Let's build cool stuff and have fun. :)

Posted

I would but as soon as I get to the files that are in .gltf format in the editor (however I do it) the error boxes come up and then as of today the editor crashes to desktop.

If I use the editor to scroll the .fbx files it doesn't crash and no errors are present it is only once it reaches the .gltf files that the editor seems to have a problem.

  • Haha 1
Posted

Oh, I bet I know what is happening...

Both these files are using "buffer.bin":

{
    "asset": {
        "generator": "FBX2glTF v0.9.7",
        "version": "2.0"
    },
    "scene": 0,
    "buffers": [
        {
            "byteLength": 32208,
            "uri": "buffer.bin"
        }
    ],

And:

{
    "asset": {
        "generator": "FBX2glTF v0.9.7",
        "version": "2.0"
    },
    "scene": 0,
    "buffers": [
        {
            "byteLength": 34608,
            "uri": "buffer.bin"
        }
    ],

Usually the bin file is named the same as the glTF, but your exporter is just saving it as "buffer.bin" for every file, overwriting the bin file used by other glTF files you export. So the editor is correctly reporting an error in the format because the data being read does not match one of the glTF files.

You can either change this setting in your glTF exporter, or save each glTF file into a separate subfolder.

Let's build cool stuff and have fun. :)

Posted

Oddly enough, I was just writing to suggest this as the possible problem as I had isolated each model type within there own folders .fbx; .mdl & .gltf and the problem had gone away...

I also created a separate texture and materials folder with textures a sub folder of materials - I'm sure somebody better at code than me could explain how to do this automatically... 

thanks Josh!

Posted
1 minute ago, Josh said:

So the Facebook FBX to glTF converter does this, right? I don't see any CLI switches to change it:

To be honest, I had no luck using that tool. I accidentally copied over my Cyclone fbx files and it just made a bunch of useless garbage. I have better luck exporting as a gltf right out of blender.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Posted

is this what this part eludes to?

 

 

> FBX2glTF --binary --draco --verbose \
          --input ~/models/source/butterfly.fbx \
          --output ~/models/target/butterfly.glb

 

so if the existing FBX2GLTF.lua included this in the process parameters?

 

  • 4 weeks later...
  • Solution
Posted

I added some code in the FBX convert script that loads the glTF file as JSON data, changes the name and location of the bin file, and resaves it. This fixes the problem and allows use of .gltf rather than .glb.

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...