0

I am using Python to generate geometry for use in GLTF format. However, the file I am writing is of one size when written in Python, but GLTF is reading it as if it has a smaller size.

print('BUFFER SIZE - ' + str(len(Vertex_Buffer)))
with open('VERTICES.bin', 'bw') as vertices_file:
    vertices_file.write(Vertex_Buffer)
print('FILE SIZE - ' + os.path.getsize('VERTICES.bin'))

The output is:

BUFFER SIZE - 151198560
FILE SIZE - 151198560

However, when trying to import this data in GLTF like so:

"buffers": [
                {
                    "uri": "VERTICES.bin",
                    "byteLength": 151198560
                }
            ]

I am getting the following error:

GLTF error

  • What size does the OS file explorer think it is? Can you share a sample .gltf + .bin that demonstrates this problem? – emackey Jun 12 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.