Hello awesome BJS team and community! We are looking to import a GLB, make some changes and export a GLB in a service context (Node JS using Playwright to provide a WebGL context). We are seeing significant differences between the time required to export a GLB in a browser context and a service context. For example we have one case where we can export a GLB is 8s in a playground that takes about 47 seconds in Node JS. We wonder if this is due to lack of access to GPU hardware acceleration in the service context (AWS Fargate). From looking at the code, we notice that, in order to get the binary data for a texture, it appears that Babylon makes a call to this: WebGLRenderingContext.readPixels() - Web APIs | MDN which seems to read data from the GPU. I can imagine that this call will be much slower in a container with no GPU as it would rely on software rendering. With that background we have three questions:
- As you can see in this PG (by commenting in each call to importScene), GLB export time seems to scale linearly with increasing texture size. Is this expected?
- Can you confirm access to GPU hardware acceleration is required for optimal export performance?
- Given that we do not care about rendering anything, e.g. generating screenshots, do you have any recommendations on how to improve performance of GLB export in a service context? Null engine does not work in our experience because texture loading seems to require a WebGL context.