Why can't this GLB obtain fsInput.attributes.texCoord_0?

Why can’t this GLB obtain fsInput.attributes.texCoord_0 ? I can’t find this attribute value. For texture(u_stripes, fsInput.attributes.texCoord_0) , what should I do to find the UV coordinates?
geology1.glb (99.0 KB)

The mesh does not have texture coordinates:

  "meshes" : [
    {
      "name" : "mesh0.003",
      "primitives" : [
        {
          "attributes" : {
            "POSITION" : 0
          },
          "extensions" : {
            "KHR_draco_mesh_compression" : {
              "bufferView" : 0,
              "attributes" : {
                "POSITION" : 0
              }
            }
          },
          "indices" : 1,
          "material" : 0,
          "mode" : 4
        }
      ]
    }
  ],

You have to assign texture coordinates to the model.

Here is a quickly fixed model with texture coordinates in (0,0)-(1,1). Note: This model does not use Draco compression. You can use any library (or things like https://gltf.report/ ) to re-apply the Draco compression.

cesium-forum-30913-fixed.zip (419.7 KB)

When there are texture coordinates, then you can apply the texture, for example, like this:

Cesium Forum 30913

(The sandcastle that I used here is mainly based on the Custom Shaders Models sandcastle, for a quick test)

I am a beginner user. How to fixed model with texture coordinates in (0,0)-(1,1)? What tool is used?thank you

thank you

How to fixed model with texture coordinates in (0,0)-(1,1)? What tool is used?

There is not really a “tool” that can do this automatically.

(I created this model by loading it with GitHub - javagl/JglTF: Java libraries related to glTF , manually assigning hard-coded texture coordinates (in code, based on the bounding box of the model), and re-exporting it. This is not a workflow that can be used easily or generically - I just wanted to create a “valid” example model here)

Someone has to decide what the texture coordinates should be. It should be possible to import the model in Blender, assign texture coordinates with Texture Coordinate Node — Blender Manual , and export the model. But I’m not a Blender expert and cannot give advice here.

(In fact, I tried to do this in Blender, but didn’t know how to do this properly - I’d need more time to familiarize myself with that…).

thank you