Weird shadow issue - Black mesh

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

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):

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

Docs:

Texture Library:

PG:

1 Like

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

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

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

1 Like