GLTF - PNG alpha channel

Hello!

I have a problem with the alpha channel of a .PNG texture. The error that appears is this:

 "numErrors": 0,
        "numWarnings": 1,
        "numInfos": 0,
        "numHints": 0,
        "messages": [
            {
                "code": "IMAGE_FEATURES_UNSUPPORTED",
                "message": "Image contains unsupported features like non-default colorspace information, non-square pixels, or animation.",
                "severity": 1,
                "pointer": "/ images / 1"

 "pointer": "/ images / 1",
                "mimeType": "image / png",
                "storage": "external",
                "uri": "oie_5201417Cc29au2.png",
                "image": {
                    "width": 1024,
                    "height": 1024,
                    "format": "rgba",
                    "primaries": "srgb",
                    "transfer": "custom",
                    "bits": 8

And comparing with an example Khronos file that has similar characteristics, the image with the same purpose:

"pointer": "/ images / 14",
                "mimeType": "image / png",
                "storage": "external",
                "uri": "FlightHelmet_Materials_LensesMat_BaseColor.png",
                "image": {
                    "width": 1024,
                    "height": 1024,
                    "format": "rgba",
                    "primaries": "srgb",
                    "transfer": "srgb",
                    "bits": 8

I believe it is this difference in the “transfer” that is generating the error. How can I solve this problem?

I am a designer, I do not understand much of this part of codes … so if someone can explain to me what I need to change in the image or export configuration to solve the problem I would be very grateful!

  • The GLTF file was exported in Blender and the PNG image and the 3D model were generated in 3ds max.

This is a warning and not an error. This specific warning is not likely cause any issues on the client side. Are you actually seeing an issue with the alpha channel?

To dig deeper, the glTF spec states this:

Any colorspace information (such as ICC profiles, intents, etc) from PNG or JPEG containers must be ignored. Effective transfer function is defined by a glTF object that refers to the image.

Implementation Note: This increases portability of an asset, since not all image decoding libraries fully support custom color conversions. To achieve correct rendering, WebGL runtimes must disable such conversions by setting UNPACK_COLORSPACE_CONVERSION_WEBGL flag to NONE .

The validator warning is there to say that there is color space information in the image which should be ignored by loaders.

Thank you, bghgary!

In fact an error is occurring on the client side which is:

Texture Load Error: Texture must use ARGB8 format.

That sounds like the image is not supported by whatever client you are using. Maybe you can describe more about the client and attach the image/model?

1 Like

Of course!

The client is using the file for applying glasses through ARCore + Sceneform, where he reports the error:
Texture Load Error: Texture must use ARGB8 format.

The image is for the diffuse map with alpha channel to create the transparency of the lenses.

This image is a jpeg which can’t store alpha. You probably should check with the client on this issue.

1 Like

I believe the image was converted by placing it here. The image I’m using is .PNG for sure!

Not sure if the forum supports zips, but if it does, you can try zipping it first.