f3d icon indicating copy to clipboard operation
f3d copied to clipboard

GLTF Webp Support

Open ScottPeterJohnson opened this issue 3 months ago • 7 comments

Is your feature request related to a problem? Please describe. F3D doesn't appear to support "EXT_texture_webp" in GLTF files, which just allows loading webp textures.

Describe the solution you'd like Ability to load GLTF models with webp textures. https://gltf-transform.dev/modules/extensions/classes/EXTTextureWebP

See the attached for a GLTF sample cube using webp that does not load.

Cube.zip

ScottPeterJohnson avatar Sep 19 '25 07:09 ScottPeterJohnson

I confirm this file is not loading however the error point to another extension (run with --verbose):

ERROR: In vtkGLTFDocumentLoaderInternals.cxx, line 1343
vtkF3DGLTFDracoDocumentLoader (0x564cadff7560): glTF extension KHR_mesh_quantization is required in this model, but not supported by this loader. Aborting


ERROR: In vtkGLTFImporter.cxx, line 558
vtkF3DGLTFDracoImporter (0x564caddfa370): Error loading model metadata


Some of these files could not be loaded: failed to load scene
  /home/glow/data/tmp/Cube.gltf

Does KHR_mesh_quantization rings a bell @ScottPeterJohnson ? Can you check if you are using this extension volontarly ?

mwestphal avatar Sep 19 '25 07:09 mwestphal

Related issue: https://github.com/f3d-app/f3d/issues/1700

Meakk avatar Sep 19 '25 08:09 Meakk

Mesh quantization did slip in there! But it seems like coincidentally EXT_texture_webp is still not supported. CubeNoMeshQuant.zip

With this one and the verbose flag I get: ERROR: In vtkGLTFDocumentLoaderInternals.cxx, line 1343 vtkF3DGLTFDracoDocumentLoader (0x652db251a6b0): glTF extension EXT_texture_webp is required in this model, but not supported by this loader. Aborting

ScottPeterJohnson avatar Sep 19 '25 11:09 ScottPeterJohnson

Duplicate of #1700 then :)

mwestphal avatar Sep 19 '25 12:09 mwestphal

Duplicate of #1700 then :)

Not really. We need to add support of webp format, but also need to implement the GLTF extension requirement.

Meakk avatar Sep 19 '25 12:09 Meakk

I'll take care of it, it should be straightforward to implement and .webp support is really important for many formats.

Meakk avatar Sep 19 '25 12:09 Meakk

Duplicate of #1700 then :)

Not really. We need to add support of webp format, but also need to implement the GLTF extension requirement.

Of course!

mwestphal avatar Sep 19 '25 12:09 mwestphal