# FBX model default material is MeshPhongMaterial , how to change?

**URL:** <https://discourse.threejs.org/t/fbx-model-default-material-is-meshphongmaterial-how-to-change/2855>\
**Category:** Questions\
**Tags:** fbx-loader, materials\
**Created:** [May 17, 2018, 2:29am UTC](https://discourse.threejs.org/t/fbx-model-default-material-is-meshphongmaterial-how-to-change/2855 "2018-05-17T02:29:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liu\_Hao](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Liu\_Hao](https://discourse.threejs.org/u/Liu_Hao)\
**Post date:** [May 17, 2018, 2:29am UTC](https://discourse.threejs.org/t/fbx-model-default-material-is-meshphongmaterial-how-to-change/2855/1 "2018-05-17T02:29:55Z")

</div>

I use FBXLoader to load my model in three.js, the game 's fps is slow, so I check it with spector.js and found that the model is using MeshPhongMaterial, see: [https://imgur.com/4zgZZ51](https://imgur.com/4zgZZ51)

The Phong material is maybe too expensive for my game, and model has no shiny surface, so I want to change it to MeshLambertMaterial, is there any approach?

---

<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:** [May 17, 2018, 5:12am UTC](https://discourse.threejs.org/t/fbx-model-default-material-is-meshphongmaterial-how-to-change/2855/2 "2018-05-17T05:12:30Z")

</div>

Lambert material is supported by the FBX spec, so it _may_ be possible to specify this in your modelling program. In practice, I have not found any way to do this - every FBX file I’ve tested has always had only Phong materials, no matter what the original settings were pre-export.

However, you can update the materials after you’ve loaded the file:

```auto
const loader = new THREE.FBXLoader();
loader.load( 'models/your_model.fbx', function ( object ) {

  object.traverse( function ( child ) {

    if ( child.isMesh ) {

         // switch the material here - you'll need to take the settings from the 
         //original material, or create your own new settings, something like:
        const oldMat = child.material;

        child.material = new THREE.MeshLambertMaterial( {  
           color: oldMat.color,
           map: oldMat.map,
           //etc
        } );

    }

  } );

  scene.add( object );

} );

```
