# Weird shadow issue - Black mesh

**URL:** <https://forum.babylonjs.com/t/weird-shadow-issue-black-mesh/35642>\
**Category:** Questions\
**Created:** [November 12, 2022, 9:54pm UTC](https://forum.babylonjs.com/t/weird-shadow-issue-black-mesh/35642 "2022-11-12T21:54:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oriongu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oriongu/32/40402_2.png) [@oriongu](https://forum.babylonjs.com/u/oriongu)\
**Post date:** [November 12, 2022, 9:54pm UTC](https://forum.babylonjs.com/t/weird-shadow-issue-black-mesh/35642/1 "2022-11-12T21:54:52Z")

</div>

Good morning,

(I’ve been trying very to not ask for help at every turn, but this one, I spent far too much time trying to get it work)

I’ve been struggling trying to get my main character shadow working correctly,

Currently everything is great, except my character is all black,. and I cannot for my life find why that is?

Do you guys have any ideas?

code here: [t5c/src/client at main · oriongunning/t5c · GitHub](https://github.com/oriongunning/t5c/tree/main/src/client)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/e/4e84559affe4d012d37097424eade3f3522c8447.png)

---

<div class="post-metadata">

**Author:** ![Takemura](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/takemura/32/25836_2.png) [@Takemura](https://forum.babylonjs.com/u/Takemura)\
**Post date:** [November 12, 2022, 10:20pm UTC](https://forum.babylonjs.com/t/weird-shadow-issue-black-mesh/35642/2 "2022-11-12T22:20:02Z")

</div>

I would check the metalness, if metalness is too high it cannot react to light but only to environmentmaps, which you most likely do not have. Re-export the model with reduced metalness and/or add an environmentlight. I had the issue of black gltf models with PBR Material as well. This code pretty much solved my issue (also had to download the .dds-file):

```auto
scene.environmentTexture = new BABYLON.CubeTexture.CreateFromPrefilteredData('textures/environment.dds', scene)

```

Docs:

> **[Using An HDR Environment For PBR | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/materials/using/HDREnvironment)**
>
> Learn about using an HDR Environment in your Babylon.js scene.

Texture Library:

> **[The Texture Library | Babylon.js Documentation](https://doc.babylonjs.com/toolsAndResources/assetLibraries/availableTextures#hdr-as-dds)**
>
> Learn about the free available textures in the Babylon.js texture library.

PG:

> **[Babylon.js Playground](https://playground.babylonjs.com/#46TSG1)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![oriongu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oriongu/32/40402_2.png) [@oriongu](https://forum.babylonjs.com/u/oriongu)\
**Post date:** [November 12, 2022, 10:58pm UTC](https://forum.babylonjs.com/t/weird-shadow-issue-black-mesh/35642/3 "2022-11-12T22:58:16Z")

</div>

Thanks for all this information @Takemura

I checked on blender doesnt seem like there is any metalness applied,

If I open the inspector, and click to button hightlighted, it does show my texture… Does that help?

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/4/746831e2d3f811e217693725670d299237d7eb32.png)

---

<div class="post-metadata">

**Author:** ![oriongu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oriongu/32/40402_2.png) [@oriongu](https://forum.babylonjs.com/u/oriongu)\
**Post date:** [November 13, 2022, 5:12am UTC](https://forum.babylonjs.com/t/weird-shadow-issue-black-mesh/35642/4 "2022-11-13T05:12:25Z")

</div>

Ok I found what was wrong, in blender you need to untick the hightlighted box

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

Looks much better now, however light and shadow still needs to be improved

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/e/4ecba29548540e40ab9e1ef3e5f1b13926df9f70.png)
