Replies: 1 comment
-
My recommendation would be to use a headless puppeteer instance (essentially Chrome that's hidden) and take a screenshot of it. You can do this with node on the server-side with minimal issues. It's certainly going to be a bit heavier/slower than what you're trying above. But it's an extremely significant effort to make a custom webgl or canvas implementation implementation that might support everything that three.js or three-vrm does. It'll likely never match the feature parity of a browser's implementation, and the browser's implementation would actually be much more optimized for rendering 3d too, so speed would likely end up being quite similar in the end to render and take a screenshot even if your above solution did work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to get PNG images from my models without using a browser because I want to get pictures of vrm models server-side. However, after a few days of trying this, I haven't achieved much.
I tried using
node-canvas-webgl
for getting the WebGL stuff:And
node-three-gltf
for getting a node-compatible GLTFLoader.However, I had no luck to render this. Seems like I'm able to load the model, but after debugging more, I found some errors.
The errors look like these:
I was wondering if someone knows the way to render a VRM model in a headless or browser-less way.
Beta Was this translation helpful? Give feedback.
All reactions