LDraw.org Discussion Forums
mpd2glb - LDraw to GLTF converter - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: mpd2glb - LDraw to GLTF converter (/thread-29424.html)



mpd2glb - LDraw to GLTF converter - Carlos Antelo - 2026-03-03

Hi there,

I've just released an initial version of mpd2glb, a node.js tool for converting from packed .mpd models to GLTF binary format (.glb).

The ouput models are world-size, i.e. centimetres in size, not LDUs, to make them consistent with other non-LDraw GLTF models with different dimensions.

The tool is already available at: https://github.com/anteloc/mpd2glb

Cheers!  Smile


RE: mpd2glb - LDraw to GLTF converter - Travis Cobbs - 2026-03-04

(2026-03-03, 23:51)Carlos Antelo Wrote: Hi there,

I've just released an initial version of mpd2glb, a node.js tool for converting from packed .mpd models to GLTF binary format (.glb).

The ouput models are world-size, i.e. centimetres in size, not LDUs, to make them consistent with other non-LDraw GLTF models with different dimensions.

The tool is already available at: https://github.com/anteloc/mpd2glb

Cheers!  Smile

As an employee at Bentley Systems (the company that acquired Cesium in 2024), I find this to be really cool. Thanks for creating this tool and sharing.

(Cesium is one of the co-creators of the glTF file format.)


RE: mpd2glb - LDraw to GLTF converter - Carlos Antelo - 2026-03-05

(2026-03-04, 16:50)Travis Cobbs Wrote: As an employee at Bentley Systems (the company that acquired Cesium in 2024), I find this to be really cool. Thanks for creating this tool and sharing.

(Cesium is one of the co-creators of the glTF file format.)

Thanks Travis, I find that LDView is really cool too!

This tool makes the .glb versions very close to their original .mpd counterparts, that was intentional, even keeping the internal structure for the models.

I posted on another thread about a VR webapp I made for inspecting models both in web and VR: https://anteloc.github.io/modelscope-xr.html

Now, the demo model that is loaded automatically when entering the app (42000-1) is actually in .glb format.

If you (or someone else) have a Meta Quest 3 headset, you can inspect that .glb model in VR, and you'll notice that the insides of it are actually the same as the original model, i.e., it's not "hollow", as it usually happens in other cases.

Cheers!


RE: mpd2glb - LDraw to GLTF converter - Carlos Antelo - 2026-03-05

Just released v0.2, with support for:

- Draco compression
- Uncompressed .glb

Available at: https://github.com/anteloc/mpd2glb/tree/v0.2

Cheers!


RE: mpd2glb - LDraw to GLTF converter - Carlos Antelo - 2026-03-05

Hi there,

I've added support for non-packed models, i.e. those that require an ldraw parts library for the conversion process.
I've also added local and remote support, which allows for:
- converting models located remotely at http(s):// urls without downloading them first
- referencing parts libraries at remote http(s):// urls, so no need to download a full parts library first

Released v0.3: https://github.com/anteloc/mpd2glb/releases/tag/v0.3

Cheers!