How to take a screenshot of a GLTF 3D model server side (Python or NodeJS)

519 Views Asked by At

How can I take a screenshot of a GLTF model in python?

The idea is to load and position a 3D model and save the screenshot as an image. I want to run this on a server, where I will host the models. I found some javascript frontend solutions, but I need it server side.

Unfortunately I haven't found anything yet which worked...

2

There are 2 best solutions below

0
Tom On

I ended up using Puppeteer, a nodeJS library, where I push the result to my python API then.

0
Kieran F. On

This is the best current solution that I have found so far: https://github.com/Shopify/screenshot-glb

It works local or server-side (as part of an automated node.js / npm script build process)