# How to recreate PBR with the NodeMaterial

**URL:** <https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003>\
**Category:** Questions\
**Created:** [June 29, 2021, 10:32pm UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003 "2021-06-29T22:32:00Z")\
**Posts on this page:** 7\
**Page:** 2

<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:** [August 2, 2021, 2:51pm UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003/21 "2021-08-02T14:51:53Z")

</div>

Have you loaded the node material package?

---

<div class="post-metadata">

**Author:** ![Yofetahe\_Habtu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yofetahe_habtu/32/14561_2.png) [@Yofetahe\_Habtu](https://forum.babylonjs.com/u/Yofetahe_Habtu)\
**Post date:** [August 2, 2021, 3:05pm UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003/22 "2021-08-02T15:05:58Z")

</div>

Yes, I did

 ![NodeMaterialEditor_issue](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/b/2b74eae76a4022fd683518cc6a1045555d440374.png)

---

<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:** [August 2, 2021, 3:14pm UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003/23 "2021-08-02T15:14:25Z")

</div>

Then (though you already answered that) it would be wonderful to have it reproduced as a project I can simply load.

---

<div class="post-metadata">

**Author:** ![Yofetahe\_Habtu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yofetahe_habtu/32/14561_2.png) [@Yofetahe\_Habtu](https://forum.babylonjs.com/u/Yofetahe_Habtu)\
**Post date:** [August 3, 2021, 9:09pm UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003/24 "2021-08-03T21:09:00Z")

</div>

@RaananW here is a github link - [yofetahe/babylonjs\_nme\_issue\_repro (github.com)](https://github.com/yofetahe/babylonjs_nme_issue_repro). It holds sample project for TypeScript and Javascript. You will get the issue on TypeScript version, when you try to open the node material editor from inspector/scene explorer.

Please let me know if it needs additional info.  
Thanks

---

<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:** [August 5, 2021, 11:49am UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003/25 "2021-08-05T11:49:13Z")

</div>

looking into it now

---

<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:** [August 5, 2021, 12:03pm UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003/26 "2021-08-05T12:03:51Z")

</div>

Ok - a temporary solution until I fully debug the situation -

Add this to the beginning of your index.ts:

```javascript
import * as TEST from '@babylonjs/core';

(globalThis as any).BABYLON = TEST;

```

And then yo get this:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/8/98e1ab41020d5250d03804588de999ac58a72c59.png)

There is an issue with the imports and the global namespace (which is not being populated when not using the UMD packages). This will update the global namespace that will then be used in the nme

---

<div class="post-metadata">

**Author:** ![Yofetahe\_Habtu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yofetahe_habtu/32/14561_2.png) [@Yofetahe\_Habtu](https://forum.babylonjs.com/u/Yofetahe_Habtu)\
**Post date:** [August 8, 2021, 1:41am UTC](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003/27 "2021-08-08T01:41:36Z")

</div>

@RaananW Thank you. I tested your temp solution and it works on my end as well. 🙂

Hope you post me when you get the permanent solution.

Thank you so much again.

[Previous page](https://forum.babylonjs.com/t/how-to-recreate-pbr-with-the-nodematerial/22003.md?page=1)
