# How do I set a GLTF model's material to be a NodeMaterial?

**URL:** <https://forum.babylonjs.com/t/how-do-i-set-a-gltf-models-material-to-be-a-nodematerial/8335>\
**Category:** Questions\
**Tags:** material, node\
**Created:** [January 31, 2020, 1:37am UTC](https://forum.babylonjs.com/t/how-do-i-set-a-gltf-models-material-to-be-a-nodematerial/8335 "2020-01-31T01:37:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![micsun-al](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/micsun-al/32/5274_2.png) [@micsun-al](https://forum.babylonjs.com/u/micsun-al)\
**Post date:** [January 31, 2020, 1:37am UTC](https://forum.babylonjs.com/t/how-do-i-set-a-gltf-models-material-to-be-a-nodematerial/8335/1 "2020-01-31T01:37:23Z")

</div>

I am loading a GLTF model, then setting it’s material to a `NodeMaterial`, but it doesn’t seem to apply to the model.

The `NodeMaterial` is created using [https://nme.babylonjs.com/](https://nme.babylonjs.com/) and exported as a json, then loaded in Babylon using `NodeMaterial`'s `loadAsync` function.

None of the properties I change from code seem to affect the GLTF model’s materials.

Using the Babylon `debugLayer.show()` GUI, I am able to change the properties of the model’s materials, but noticed the material’s class is “`PBRMaterial`” instead of the material I set it to in code (a material that extends “`NodeMaterial`”).

My end goal is to apply a vertex shader to the loaded GLTF models to bend the road (this is an infinite runner).

Thank you!

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [January 31, 2020, 9:47am UTC](https://forum.babylonjs.com/t/how-do-i-set-a-gltf-models-material-to-be-a-nodematerial/8335/2 "2020-01-31T09:47:17Z")

</div>

Check [https://www.babylonjs-playground.com/#SYQW69#29](https://www.babylonjs-playground.com/#SYQW69#29) , lines 60 - 63. This is where the (very simple) NodeMaterial is applied to the meshes loaded
