KhronosGroup / glTF-Compressor

To store the source code for the glTF-Compressor project
Other
58 stars 6 forks source link

Slow to run in Chrome? #11

Open ROBYER1 opened 1 year ago

ROBYER1 commented 1 year ago

Feeding this back from myself and the 3D team at my work, we all find that the compressor runs very slow on the web, is there any plan to do a Windows/Mac/Linux build of this that runs local?

The wait times for compression can feel very long and Chrome on Windows 10/11 can often freeze for a few minutes running it as the only open tab.

I have used similar compressors such as gltfpack: https://github.com/zeux/meshoptimizer/releases and Needle Tools which run much faster natively https://needle.tools/

We are testing with models from the GLTF samples repo such as DamagedHelmet and BarramundiFish so these aren't big test models.

Just wondering if running on the web is what is causing the performance bottlenecks?

DR-xR commented 1 year ago

Thank you for your use and report on glTF-Compressor. The glTF-Compressor tool was designed to be an investigative support tool. It does have limitations with respect to large/complex models or production runs. Those were out-of-scope of the project. Khronos felt that it was important to get a tool like this out as open source, but did not want to get to the realm of supporting production (either volume or model size). If glTF-Compressor does not meet your needs, we suggest you use a Khronos member tool such as RapidCompact or Needle Tools.

donmccurdy commented 1 year ago

I would just add that Needle Tools is using glTF Transform (https://gltf-transform.dev/) for texture compression and other optimizations, which in turn uses KTX Software (https://github.com/KhronosGroup/KTX-Software). You may find it helpful to use glTF Compressor to identify the quality/compression settings that work best for your content, and then to instrument the final production compression pipeline with one of these other tools.

ROBYER1 commented 1 year ago

You may find it helpful to use glTF Compressor to identify the quality/compression settings that work best for your content, and then to instrument the final production compression pipeline with one of these other tools.

Yep that's the workflow I am using, just wanted to feed back that the web compressor previewing does feel very slow by comparison to Needle Tools compression which makes previewing almost faster in Needle when I do a build and test there alone. I would like to use the web GLTF compressor to get fast previews of compression but the speed of compressing holds me back from doing that.

donmccurdy commented 1 year ago

I'd been hoping to move glTF Transform over to a WebAssembly KTX2 encoder at some point, so it's helpful to hear that there's a major performance cost there, at least in the current WASM encoders. I'll keep that in mind, thanks!