# Not able to load .FBX file

**URL:** <https://discourse.threejs.org/t/not-able-to-load-fbx-file/15870>\
**Category:** Questions\
**Tags:** fbx-loader, textures\
**Created:** [June 4, 2020, 6:28am UTC](https://discourse.threejs.org/t/not-able-to-load-fbx-file/15870 "2020-06-04T06:28:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thunder\_Bird](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/thunder_bird/32/7121_2.png) [@Thunder\_Bird](https://discourse.threejs.org/u/Thunder_Bird)\
**Post date:** [June 4, 2020, 6:28am UTC](https://discourse.threejs.org/t/not-able-to-load-fbx-file/15870/1 "2020-06-04T06:28:52Z")

</div>

I have a .FBX file with textures. Everytime i try to load that file it gives me this error

```
 `THREE.FBXLoader: FBX binary version: 7400`

 TypeError: Cannot set property 'encoding' of undefined
    at FBXLoader.js:425
    at Array.forEach (<anonymous>)
    at FBXTreeParser.parseParameters (FBXLoader.js:410)
    at FBXTreeParser.parseMaterial (FBXLoader.js:333)
    at FBXTreeParser.parseMaterials (FBXLoader.js:312)
    at FBXTreeParser.parse (FBXLoader.js:98)
    at FBXLoader.parse (FBXLoader.js:84)
    at Object.onLoad (FBXLoader.js:44)
    at XMLHttpRequest.<anonymous> (three.module.js:24307)

```

**code:**

```
        var loader = new FBXLoader();
        	loader.load( 'fbxModel/model.FBX', function ( object ) {
        		scene.add( object );
        	} );
```

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 4, 2020, 7:59am UTC](https://discourse.threejs.org/t/not-able-to-load-fbx-file/15870/2 "2020-06-04T07:59:44Z")

</div>

> [@Thunder\_Bird](#):
>
> I have a .FBX file with textures.

Can you please share the FBX file (with the texture)?

---

<div class="post-metadata">

**Author:** ![Thunder\_Bird](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/thunder_bird/32/7121_2.png) [@Thunder\_Bird](https://discourse.threejs.org/u/Thunder_Bird)\
**Post date:** [June 5, 2020, 7:52am UTC](https://discourse.threejs.org/t/not-able-to-load-fbx-file/15870/3 "2020-06-05T07:52:14Z")

</div>

I have asked for permission to share the file, till then what is observed is in the FBXLoader code, after adding debugger,  
**examples/jsm/FBXLoader.js** line **627** ,

```
    case 'DiffuseColor':
          case 'Maya|TEX_color_map':
            parameters.map = scope.getTexture(textureMap, child.ID);
            parameters.map.encoding = sRGBEncoding;
            break;

```

my FBX file is not layeredTextured and  
**parameters.map** is getting undefined and thus this line **parameters.map.encoding = sRGBEncoding;** is breaking.  
by any chance can u guys tell, what must be missing in fbx file???

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 5, 2020, 8:50am UTC](https://discourse.threejs.org/t/not-able-to-load-fbx-file/15870/4 "2020-06-05T08:50:06Z")

</div>

> [@Thunder\_Bird](#):
>
> by any chance can u guys tell, what must be missing in fbx file???

Well, for some reasons the loader is not able to find a texture for the given ID. Things might get more clear if it’s possible to inspect the FBX.
