gltf-transform optimize --texture-compress webp yields Invalid JPG, marker table corrupted #1305
-
Hi there, Since the texture file is a real 16384x16384 16k image, I just downscaled it to 16383x16383 to avoid this issue with webp images - see below note ref for other formats size limits if useful. I've tried multiple combinations of
If I understand things correctly, the best way to do this compression would probably be to use the Regarding max images resolutions, see here for other file formats size limits
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
Hi @jo-chemla! On the choice of KTX2 or WebP, note that WebP will have the same GPU size as JPEG or PNG. WebP will generally be smaller on disk, but no different on the GPU. See Choosing texture formats... for more on that. I'm not sure what to make of the It is possible that gltf-transform uastc input.glb output1.glb \
--slots "{normalTexture,occlusionTexture,metallicRoughnessTexture}" \
--level 4 --rdo 4 --zstd 18
gltf-transform etc1s output1.glb output2.glb --quality 255 Small adjustments to the flags above would be needed if you're using the v4 alpha release. |
Beta Was this translation helpful? Give feedback.
I've merged #1306 and published an updated version to
v4.0.0-alpha.10
, fixing theInvalid JPG, marker table corrupted
error. With that update, using--texture-compress webp
should work correctly, up to the size limits of the format and the Sharp encoder (https://sharp.pixelplumbing.com/). Example:It's a lower resolution texture of course, but does reduce total size from 94 MB to 13.5 MB.
I should note that
.glb
files written by glTF Transform will embed any associated textures, whereas your source.glb
file had a reference to an external texture, so that difference would ne…