xeokit glTF Conversion Tests

The xeokit SDK empowers us to quickly load large, full-precision glTF models on the Web, enabling seamless browser viewing within seconds. To achieve this, we use our CLI tools to pre-convert glTF models into xeokit's efficient and fast-loading native XKT format.

We routinely validate the effectiveness of our conversion tools through tests with xeokit's conversion test suite. This suite performs batch conversions on a selected set of glTF models, resulting in the XKT models listed in the "Converted glTF Models" section below.

In this page, you'll also find detailed information on how we configure and execute the conversion process, providing insights for establishing your own glTF conversion pipeline with xeokit.

Converted glTF Models

In the table below are the results from our most recent glTF conversion run. On the far right, select "View" to observe the converted model in a xeokit web viewer. Choose "Log" to inspect the conversion log associated with that model. Additionally, "Link" provides a link through which you can hot-load the converted model into a xeokit web viewer.

gltf Filegltf Size (Mb)XKT Size (Mb)Conversion Time (Secs)Converted XKT
Archicad
AR-Demo_Sample_Single_Building_01.gltf 5.1274 0 3.30 View Debug Log Link Zip
Archicad-Demoprojekt.gltf 5.2916 0 2.84 View Debug Log Link Zip
ME-Demo_Sample_Single_Building_01.gltf 3.7996 0 2.80 View Debug Log Link Zip
ST-Demo_Sample_Single_Building_01.gltf 1.0596 0 1.17 View Debug Log Link Zip
BoxTextured-glTF-Binary
BoxTextured.gltf 0.0065 0 0.92 View Debug Log Link Zip
DamagedHelmet-glTF-Binary
DamagedHelmet.gltf 3.7739 0 3.46 View Debug Log Link Zip
HousePlan-glTF-Binary
HousePlan.gltf 28.6504 0 5.02 View Debug Log Link Zip
VianneyHouse-glTF-Binary
VianneyHouse2.gltf 2.4269 0 1.39 View Debug Log Link Zip



glTF Conversion System Configuration

Below is a summary of our system specifications, along with the versions of the CLI converter tools and xeokit SDK we used. In this case, we're running everything on Linux, but you can just as easily run it on Windows and Mac O/S.

Date Fri Apr 12 2024 16:25:41 GMT+0200 (Central European Summer Time)
CPU Manufacturer Intel
CPU Brand Xeon® Gold 6134
Memory 135 GB
OS Platform linux
OS Distro Ubuntu
OS Release 22.04.4 LTS
Node.js v20.12.0
@xeokit/xeokit-convert 1.1.15-beta-8
@xeokit/xeokit-sdk 2.6.0-beta-12

glTF Conversion Pipeline Setup

We ran our converter tools on each glTF file in our test collection using the CLI commands shown below. For each glTF file, we substitute "model" with the name of that file.


convert2xkt

The convert2xkt tool converts various model file formats into XKT format, which we can view in the browser with xeokit. We use it to convert glTF files into XKT files, as shown in the command below.

XKT is xeokit's web-friendly native binary model format, designed to load quickly into its web viewer. Note that convert2xkt is NodeJS-based CLI tool that often needs us to allocate it some extra memory, as we're doing here.

node --max-old-space-size=14000 convert2xkt -c convert2xkt.conf.json -s model.gltf -o model.xkt

xeokit-sdk

Finally, we visualize our XKT file in the browser using xeokit's web viewer. In JavaScript, we simply create a Viewer, add an XKTLoaderPlugin, and then load our XKT file.


convert2xkt Arguments

The table below lists the arguments we're providing to convert2xkt to convert each glTF file.

-c convert2xkt.conf.json Path to convert2xkt configs file.
-s Path to the input glTF file to convert.
-o Path to the XKT file to create as output.

convert2xkt Configs

As shown from the provided arguments, we pass configurations to convert2xkt through a JSON configuration file named convert2xkt.conf.json. The configuration file's content is displayed below.

In the configuration file, the "sourceConfigs" object contains the "gltf" and "glb" objects, which contain the configurations used by convert2xkt in our glTF conversion tests.