-2
$\begingroup$

images and bin are embedded in base 64 formats with URI, here I copied base 64 gltf content for your reference

thanks in advance

{ "asset": { "generator": "COLLADA2GLTF", "version": "2.0" }, "scene": 0, "scenes": [ { "nodes": [ 0 ] } ], "nodes": [ { "children": [ 1 ], "matrix": [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, { "mesh": 0 } ], "meshes": [ { "primitives": [ { "attributes": { "NORMAL": 1, "POSITION": 2 }, "indices": 0, "mode": 4, "material": 0 } ], "name": "Mesh" } ], "accessors": [ { "bufferView": 0, "byteOffset": 0, "componentType": 5123, "count": 36, "max": [ 23 ], "min": [ 0 ], "type": "SCALAR" }, { "bufferView": 1, "byteOffset": 0, "componentType": 5126, "count": 24, "max": [ 1.0, 1.0, 1.0 ], "min": [ -1.0, -1.0, -1.0 ], "type": "VEC3" }, { "bufferView": 1, "byteOffset": 288, "componentType": 5126, "count": 24, "max": [ 0.5, 0.5, 0.5 ], "min": [ -0.5, -0.5, -0.5 ], "type": "VEC3" } ], "materials": [ { "pbrMetallicRoughness": { "baseColorFactor": [ 0.800000011920929, 0.0, 0.0, 1.0 ], "metallicFactor": 0.0 }, "name": "Red" } ], "bufferViews": [ { "buffer": 0, "byteOffset": 576, "byteLength": 72, "target": 34963 }, { "buffer": 0, "byteOffset": 0, "byteLength": 576, "byteStride": 12, "target": 34962 } ], "buffers": [ { "byteLength": 648, "uri": "data:application/octet-stream;base64,AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAAvwAAAL8AAAA/AAAAPwAAAL8AAAA/AAAAvwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAL8AAAA/AAAAvwAAAL8AAAA/AAAAPwAAAL8AAAC/AAAAvwAAAL8AAAC/AAAAPwAAAD8AAAA/AAAAPwAAAL8AAAA/AAAAPwAAAD8AAAC/AAAAPwAAAL8AAAC/AAAAvwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAvwAAAD8AAAC/AAAAPwAAAD8AAAC/AAAAvwAAAL8AAAA/AAAAvwAAAD8AAAA/AAAAvwAAAL8AAAC/AAAAvwAAAD8AAAC/AAAAvwAAAL8AAAC/AAAAvwAAAD8AAAC/AAAAPwAAAL8AAAC/AAAAPwAAAD8AAAC/AAABAAIAAwACAAEABAAFAAYABwAGAAUACAAJAAoACwAKAAkADAANAA4ADwAOAA0AEAARABIAEwASABEAFAAVABYAFwAWABUA" } ] }

$\endgroup$
  • $\begingroup$ This is a question for coders. Off-topic. $\endgroup$ – Lukasz-40sth Jan 28 at 9:09
2
$\begingroup$

glTF Export Options

I'm assuming you're asking about Blender, since you posted this on the Blender Stack Exchange. Blender offers a "Format" chooser at the top of the export options for glTF, with three options:

  • glTF Separate (.gltf + .bin + textures)
  • glTF Embedded (.gltf)
  • glTF Binary (.glb)

The last one, *.glb, is the default. This is the most compact and shareable form of glTF, where all assets are packed into one binary file. It does not use Base64 encoding, all of the binary assets are true binary here.

The top one, "glTF Separate", is great for debugging or further hand-edits to the exported file. It's perhaps not as good for sharing, due to the use of multiple files. The overall node hierarchy and settings are in plain text (JSON) in the .gltf file, which references a .bin that contains mesh data, and also references .jpg and .png image files for texturemaps.

The middle one, "glTF Embedded", is the only one that does Base64 encoding. It packs the glTF model, all binary mesh data, and all PNG/JPG images, all into a single .gltf plain text JSON file, using Base64 to encode the binary parts to plain text. This is the least efficient form, and I don't recommend it for normal use. But, this appears to be the one you're asking about in the original question, so if you really need this one, you can just choose it from the combo box shown here. The file will be a fair percentage larger than the other two forms, due to the Base64 encoding.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.