XYZ to glTF Converter: Use GLB While .gltf Output Is Broken
Right now an XYZ converted here to glTF downloads as a lone .gltf whose binary buffer is missing, so viewers cannot load the points. Choose XYZ to GLB instead, which stores the same point data in one self-contained file.
Download Started!
How would you rate your experience with MiConvert?
What happens when you convert XYZ to glTF today
XYZ stores a scanned point cloud as lines of text, each line holding the X, Y and Z of one point. glTF is the Khronos Group's open format for delivering 3D to real-time viewers such as three.js, Babylon.js and Google's model-viewer. It comes in two packagings with the same content: a .gltf JSON file that points to a separate .bin buffer and images, or a .glb that holds everything in one binary file. People converting a scan to glTF usually want it on a web page or in a browser-based viewer.
On this page the XYZ goes through our point-cloud reader and is written out as glTF by the trimesh library. That writer stores the point data in buffer files named gltf_buffer_0.bin and so on, while our packager only collects files that share the original file's name. The buffers are left behind, and the download is a single .gltf referring to data you do not have, so viewers report a missing buffer or show nothing. In a batch, buffers from different files can also overwrite one another. This is a known bug that is not fixed yet, and we do not recommend this output until it is.
The XYZ to GLB conversion uses the same reader and writer but embeds the buffer inside the file, so it is not affected. The GLB holds the points themselves, with no faces. Point colors are kept in GLB when the reader finds them. Scans above 1,000,000 points are cut down to a random selection of 1,000,000. When coordinates exceed 100,000, as survey data often does, the points are stored near the origin and the offset is kept in the node transform, which helps viewers that work in single-precision floats.
Two caveats apply to the GLB as well. The scan is Z-up and is written into glTF's Y-up space without being turned, so it appears rotated 90 degrees about X, lying on its back. Values are not converted either: glTF treats them as meters, so a cloud recorded in millimeters looks 1,000 times too big. Neither the rotation nor any subsampling is reported on the page.
How to get a working glTF-family file from XYZ
- Make sure the .xyz is plain numeric rows with x, y and z first; spaces, commas and semicolons all work as separators.
- Open the XYZ to GLB converter rather than using the glTF output from this page.
- Upload the file: up to 50 MB without an account, 100 MB signed in, 200 MB on Plus or 1 GB on Pro.
- Download the .glb within about 4 hours, before it is deleted.
- Load it in your viewer and correct the orientation, for example in three.js by setting the object's rotation.x to minus Math.PI / 2.
- If a tool insists on the text .gltf form, run the GLB through our GLB to glTF converter, which delivers the .gltf with its .bin in a ZIP.
What this XYZ conversion does and does not do
- Current status: .gltf output from XYZ downloads without its .bin buffer; GLB output is unaffected
- Reads XYZ text rows separated by spaces, commas or semicolons
- Writes the scan as points, without adding faces or reconstructing a surface
- Keeps up to 1,000,000 points, picked at random when the scan is larger
- Moves coordinates above 100,000 close to the origin in GLB and records the offset in the node transform
- Keeps point colors in GLB output when they are present in the file
Video Tutorial
Are you struggling with how to convert your XYZ file to GLTF format? Don't worry, in this video I will reveal a super convenient tool to help you change your file extension completely for free without
XYZ to glTF questions
Why won't my converted .gltf open?
Because its buffer file never made it into the download. The .gltf names a gltf_buffer_0.bin that our packager does not pick up, so the point data is missing and viewers fail or show an empty scene. Convert the same XYZ to GLB instead; that file carries its data inside and opens normally.
Is GLB a different format from glTF?
No. GLB is the binary container defined by the same glTF 2.0 specification, holding the JSON description and the buffers in one file. three.js, Babylon.js, model-viewer and other glTF 2.0 viewers load GLB as readily as .gltf, and for web delivery a single file is often simpler to host.
Can I still end up with a .gltf file?
Yes, in two steps. Convert XYZ to GLB here, then convert that GLB with our GLB to glTF converter, which packs the .gltf and its .bin together in a ZIP. Offline, the gltf-transform command-line tool can also unpack a GLB into .gltf with its copy command.
Will my point cloud become a surface?
Not in glTF or GLB, which receive points only. For terrain or aerial clouds, our XYZ to STL converter builds a closed height-field surface, and OFF or DAE output gives an open one. Scans of objects or rooms need meshing in MeshLab or CloudCompare first, because no general surface reconstruction is available here.
How do I convert XYZ coordinates to latitude and longitude?
This converter does not do that. It copies coordinate values unchanged and does not reproject between coordinate systems. To turn projected X and Y values into latitude and longitude, use GIS software such as QGIS or the PROJ library, which also need to know the coordinate system the scan was recorded in.
Why does the model look sideways in my viewer?
The scan's Z-up coordinates are written into glTF's Y-up space without a correction, so the cloud lies on its back. Rotate it 90 degrees about X in your viewer or scene code; in Blender, import the GLB, rotate it on X and apply the rotation before exporting again.
How long is my scan kept on your server?
The uploaded XYZ is deleted when its conversion ends, and the converted file is removed about 4 hours after it finishes. There is no gallery or public listing, and the download link carries an unguessable token, though it works for anyone who has it until it expires. File names and conversion results appear in our logs, and a signed-in account keeps a history entry until the account is deleted.