# NME material losing shadows, how do I get it back

**URL:** <https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354>\
**Category:** Questions\
**Created:** [March 26, 2023, 2:43am UTC](https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354 "2023-03-26T02:43:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BoldBigflank](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/boldbigflank/32/4426_2.png) [@BoldBigflank](https://forum.babylonjs.com/u/BoldBigflank)\
**Post date:** [March 26, 2023, 2:43am UTC](https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354/1 "2023-03-26T02:43:57Z")

</div>

I’m trying to make a simple textured material. I’ve noticed that when it’s this simple, the shading of the sides goes away. What’s the simplest way to make shadows work again? It’s ok if it’s a fake, distance of the normal from a vector, style.

Playground

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#02VPYA%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

NME

> **[Babylon.js Node Material Editor](https://nme.babylonjs.com/#87Y2T8)**
>
> Babylon.js Node material editor - shader-based materials editor for Babylon.js

---

<div class="post-metadata">

**Author:** ![BoldBigflank](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/boldbigflank/32/4426_2.png) [@BoldBigflank](https://forum.babylonjs.com/u/BoldBigflank)\
**Post date:** [March 26, 2023, 3:36am UTC](https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354/2 "2023-03-26T03:36:34Z")

</div>

Here’s what I found while poking around. I hooked up a Lights node and multiplied the output. I needed to change my Color4s to Color3s so they would match.

> **[Babylon.js Node Material Editor](https://nme.babylonjs.com/#87Y2T8%231)**
>
> Babylon.js Node material editor - shader-based materials editor for Babylon.js

This might be the solution, but I’m keeping the question open in case others have more insight into it.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 26, 2023, 2:55pm UTC](https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354/3 "2023-03-26T14:55:56Z")

</div>

I’m not sure to understand what the problem is…

Maybe try another type of light like a point or directional light?

---

<div class="post-metadata">

**Author:** ![BoldBigflank](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/boldbigflank/32/4426_2.png) [@BoldBigflank](https://forum.babylonjs.com/u/BoldBigflank)\
**Post date:** [March 26, 2023, 6:36pm UTC](https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354/4 "2023-03-26T18:36:08Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/d/ad12c84ba4f4866e1f9304fb10e79200cb17f419.jpeg)

Here’s an annotated screenshot of what I’m talking about.

And for completeness, here’s how my updated nme looks.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/7/b7b35be60aa1670c0c4c62e830545a08fcc0ea2e.jpeg)  
I think it’s enough, but I might be missing some other details that I won’t happen upon until I build more with it.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 26, 2023, 7:19pm UTC](https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354/5 "2023-03-26T19:19:08Z")

</div>

You must use the `Light` block if you want your material to be affected by lights:

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#02VPYA%232)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![BoldBigflank](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/boldbigflank/32/4426_2.png) [@BoldBigflank](https://forum.babylonjs.com/u/BoldBigflank)\
**Post date:** [March 26, 2023, 7:49pm UTC](https://forum.babylonjs.com/t/nme-material-losing-shadows-how-do-i-get-it-back/39354/6 "2023-03-26T19:49:39Z")

</div>

Thanks, looks like this is the solution
