Best way to import skp file into another app

I’m developing an desktop application for rendering, using Electron and Three.js. I want to make it able to import SketchUp’s skp file. Come here for advice.

Currently, my app can import glTF file using Threejs’s GLTFLoader, since SketchUp 2024 can export gltf natively. However, many of my clients use SketchUp 2023 or lower, so they have to use glTF exporter extension (e.g., gltf-exporter) to achieve that. But these extensions are not perfect because sometimes they get slower or stuck or lost material.

So I want to make my app able to directly import skp file like other render application. For example, TwinMotion (SketchUp Direct Link for Twinmotion), and D5 Render (D5 SketchUp LiveSync).

What’s the best way to achieve that?
Should I refer SketchUp C API and build a skp-to-threejs converter inside my program? If that’s the case, I should write the converting logic in C language and use Node API (nodejs add-on) to communicate with my main program. Maybe I have to code the conversion of all vertices, lines, faces, materials, and textures manually.

If that’s true, is there any existing example or reference? Or is there any better way?
I’ll appreciate for any advice!

1 Like

That sounds like a cool project. I can’t offer any help but please keep us updated on the progress.