[x3d-public] gltf textures and image embedded color profiles

Andreas Plesch andreasplesch at gmail.com
Sat Feb 25 11:04:11 PST 2023


I found that x3dom currently fails this glTF test:

https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/TextureEncodingTest

because it only partially deals explicitly with sRGB versus linear
color space encoding, and always will use color profile information
embedded into image files, like png.

For some textures gltf requires ignoring embedded color profiles but
not for others. I think this means it will be necessary to add a field
to ImageTexture to indicate what to do with such embedded profiles. I
suggest SFString "colorSpaceConversion" with "none" and "default" as
possible values following the option for the createImageBitmap DOM
method which is able to treat image files in this way.

For X3D color space treatment for specific texture types may remain
beyond the scope of the spec., eg. browser dependent. This means
"default" would be the default value of such a field.

-Andreas
--
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list