# \[Be Solved\]GLTF file can not load texture

**URL:** <https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734>\
**Category:** Questions\
**Tags:** textures\
**Created:** [August 9, 2018, 11:55am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734 "2018-08-09T11:55:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 9, 2018, 11:55am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/1 "2018-08-09T11:55:25Z")

</div>

First,I learned an example of the GLTFLoad ,then I used Blender to build a Model and used glTF-Blender-Exporter export gltf file. when i used GLTFLoad() to load the gltf file,why can’t load the texture. There is no error in the Console.I can find the texture Info .

```auto
var gltfLoader = new THREE.GLTFLoader();
      gltfLoader.load( 'assset/test/testgltf1.gltf', function ( gltf ) {
					gltf.scene.position.set(0,2,3);
					scene.add( gltf.scene );
					console.log(gltf.scene.children[0])
				} );

```

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [August 9, 2018, 12:16pm UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/2 "2018-08-09T12:16:53Z")

</div>

Can you share your model and textures here?

Make sure that you have placed the texture in the same directory as the glTF file so that the loader can find it.

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [August 9, 2018, 4:23pm UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/3 "2018-08-09T16:23:14Z")

</div>

GLTFLoader should fail with an error if it can’t find a texture — when you export from Blender, do you see the texture in the export folder? If not, probably double-check that your materials are [configured in a way the exporter understands](https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/docs/user.md).

Also be sure to include an error callback when calling `.load()`, to be sure errors aren’t silenced:

```auto
loader.load('foo.gltf', onLoad, undefined, onError);

```

May also be worth trying the model here: [https://gltf-viewer.donmccurdy.com/](https://gltf-viewer.donmccurdy.com/)

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 1:26am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/4 "2018-08-10T01:26:46Z")

</div>

.bin .gltf and texture all three files exported through blender are in the same path,i can load the model and no error in the Console . I don’t know WHY NOT show the texture.

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 1:36am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/5 "2018-08-10T01:36:57Z")

</div>

I can load the model and no error in the Console . when i through [gltf-viewer](https://gltf-viewer.donmccurdy.com/) also can’t show the texture

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 1:40am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/6 "2018-08-10T01:40:30Z")

</div>

![test](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/9/900554e3b4d442fbc84df127b778db82c36ad49c.png) the export files

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [August 10, 2018, 2:52am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/7 "2018-08-10T02:52:58Z")

</div>

I think you’ll need to share the files if you can. Ideally the four files shown above, as well as the original `.blend` file. If you can’t share those, could you open the `.gltf` file in a text editor and verify that the images are mentioned there?

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 3:09am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/8 "2018-08-10T03:09:40Z")

</div>

In the Console , i print the `gltf.scene.children[0]` ,that about `Mesh` info. ![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/9/94bdeb3415f489fb460f0e43905ee78aa58b1b63.png)  
 ![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/5/5e1f2ddf90618b13dee57845e63904144e2933b0.png) ,THX.

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 3:14am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/9 "2018-08-10T03:14:23Z")

</div>

I tried to add Diffuse color to Model,it can be show.

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 3:21am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/10 "2018-08-10T03:21:37Z")

</div>

The Model is very simple.[3D.blend](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/0/0217b8e8634c2cd9b3818be608fea26629c4f06e.blend) (497.7 KB).thank you .

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [August 10, 2018, 3:39am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/11 "2018-08-10T03:39:57Z")

</div>

Please share the glTF, bin, and texture files.

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [August 10, 2018, 3:42am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/12 "2018-08-10T03:42:37Z")

</div>

Do you see the image in Blender? When I open the `.blend` file, I can see that there is supposed to be an image, but it isn’t visible in the 3D view, probably because it isn’t embedded in the `.blend` file. When I replace it with an image of my own, it exports correctly. Also, are you using KhronosGroup/glTF-Blender-Exporter, or Kupoman/blendergltf, to export?

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 4:08am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/14 "2018-08-10T04:08:54Z")

</div>

[testgltf1.gltf](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/d/d2393c5f78031ca21748552c6dbe36e1d2526907.gltf) (4.1 KB)  
[testgltf1.bin](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/f/f225da11f054bc954054ce341c1ccd5f70de4387.bin) (612 Bytes)  
 ![server](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/a/acc1a4d6c9a19372848b0ef32f7ec9e5c308c87c.png)

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 4:13am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/15 "2018-08-10T04:13:15Z")

</div>

I used Kupoman/blendergltf, to export. Can you give me your test image,i want to try it.I thought that as long as the size of the picture is 2 power.

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 10, 2018, 4:18am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/16 "2018-08-10T04:18:58Z")

</div>

I don’t knows the images is visible in 3D view,just thought it could be Rendered the images is ok.

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [August 10, 2018, 10:50am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/17 "2018-08-10T10:50:13Z")

</div>

Your geometry doesn’t have any UVs. I would suggest you try exporting with a different exporter, such as the KhronosGroup/glTF-Blender-Exporter, or make sure the exporter you are using is up to date.

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [August 10, 2018, 3:41pm UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/18 "2018-08-10T15:41:51Z")

</div>

You may need to add UVs in Blender, too. In the Mesh tab, add a “UV Map” 🙂

 ![30%20AM](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/3/390b4e989e560977de471bcbbec0ae40bb60e48a.jpg)

But typically I also use KhronosGroup/glTF-Blender-Exporter. Only one can be enabled at a time.

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 13, 2018, 2:03am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/20 "2018-08-13T02:03:57Z")

</div>

Thank you very much for solving the problem.It’s great to meet you as a beginner.

---

<div class="post-metadata">

**Author:** ![Renekton1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/renekton1/32/3040_2.png) [@Renekton1](https://discourse.threejs.org/u/Renekton1)\
**Post date:** [August 13, 2018, 2:06am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/21 "2018-08-13T02:06:23Z")

</div>

Thank you. The problem has been solved

---

<div class="post-metadata">

**Author:** ![jserra](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jserra](https://discourse.threejs.org/u/jserra)\
**Post date:** [October 17, 2018, 10:48am UTC](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734/22 "2018-10-17T10:48:29Z")

</div>

I stumbled across this thread in search of an answer.

I checked the fbx file that I converted with FBX2glTF at the following site: [https://gltf-viewer.donmccurdy.com/](https://gltf-viewer.donmccurdy.com/)

The object loads completely white. There are six notes for the object (representing the parts)

Code:  
MESH\_PRIMITIVE\_UNUSED\_TEXCOORD  
Message:  
Material does not use texture coordinates sets with indices (0).  
Pointer:  
/meshes/0/primitives/0/material

- **Format:** glTF 2.0
- **Generator:** FBX converter by Facebook
- **Primitives:** 5

The output from running FBX2glTF file.fbx is two directories:

file\_out: which contains  
file.gltf  
buffer.bin

and

file.fbm: which contains  
example.tif.

I was reading elsewhere that three.js might not be able to read the .tif format so I also saved this as a .png.

I can’t get the texture / image to load and need to know what the message was in the FBX GLTF debugger.

![example](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/8/8172a47475ce1fe5cfe8e2acb78e6fe4457104ee.jpeg)

If anyone has any suggestions they’d be greatly appreciated.

[Next page](https://discourse.threejs.org/t/be-solved-gltf-file-can-not-load-texture/3734.md?page=2)
