Using Sketchfab API to search and download glTF (to be integrated in Castle Game Engine)

Posted on

Knight glTF model from by thanhtp
Cthulhu model from by TooManyDemons
Cthulhu model from by TooManyDemons
Apple model from by tzeshi

This was super-fun and super-quick to develop (thanks to GitHub Copilot) 🙂

I present a sample application that searches Sketchfab and downloads glTF model matching given query string. For extra effect, it even opens the model with view3dscene if it is present on $PATH.

By default it looks for cthutlhu and happily downloads the first result, extracting the ZIP and running view3dscene. From nothing -> Cthulhu 3D model!

Run with some command-line parameter to change the search string, to anything.

The code contains a simple class that downloads from Sketchfab. If you want, you can easily tweak it to download a particular model instead of the first search result. Read the “Usage” description for details.

Start the discussion at Castle Game Engine Forum