How disable shading on the mesh?

How I can disable shading on my model?
On the screenshot I show shadows on face with inverted normal.

Something like “lit mode” from Unreal Engine…


But when I setup material.unlit=true mesh lose textures include reflectionTexture and got black color.

Hey!

you can set material.emissiveColor to white, or material.disableLightning to true

Both should work

1 Like

.emissiveColor = new Color3(1,1,1); made mesh white color, but now mesh lost reflectionTexture

image

.disableLighting = true; I dont know what it made for mesh, but shading still here.
I think it because in my scene no any lights.

image

Can you share a repro in the playground?

1 Like

Difficult for us to do anything without a pg ^^

i don’t know which light(s) you’re using…
but try this for a Hemi ( comment out line 31 to see the difference )
https://playground.babylonjs.com/#PIW7ST

How ca I upload my model to playground?

https://doc.babylonjs.com/resources/external_pg_assets

Thanks, I made playground and still doesnt realize how can fix this problem

https://playground.babylonjs.com/#PIW7ST#4

PS Model look like broken, but this effect I see on the good some curved models but on them not so strong.

It seems to be a vertex normal issue in your mesh. All green colors mean that your normal are not correctly oriented:

It is flat model, from other side these faces have right orient.
Anyway, on the models with more “righted” normal orientation I still see shading effect, and I need disable it.

shading is off here:
https://playground.babylonjs.com/#PIW7ST#5

But still not sure what to look at :smiley:

Yep, i tried these options. I want just flat model, without any shading, just reflection map and nothing more =)
As I know normals use for shading, so I want disable them processing in my scene. Seems like it low level render feature :thinking:

But this is what you have: Only reflection :slight_smile:

Reflection and shading. No, shading I did not want

One more playground https://playground.babylonjs.com/#PIW7ST#6

Here more regular model with “broken” shading:
image

But if apply morph to 1, then shding will fixed:
image

but morphing doesn change normals.
In Blender normals before morph

and after

And I dont realize what happen here:

If i understood correctly, you don’t want any black spots or areas…
I assume (without looking deeper) that this is due to some ancient math issue (something * 0 = black)

well, i gave it a go and added some emissive,
this is the best i can get it, https://playground.babylonjs.com/#PIW7ST#8

1 Like

Yes! =)

I tried something like this and it looks like hacking, but in fact dont fixed.
And the depend from infulence working just with one morpth, but what will be when morphing target are several with non zero value?
But this decision better then nothing! Currently I will use it.

And I still dont understand why when I setup morph target to 1.0 shading are correctly (as I expect).

ps. sorry for my english, its really hard to describe .)

I think to have found trouble — on the model some vertextes does not connected

Ok sounds better because it was definitely not an issue with lighting as it was off

But shading still persist on the inverted faces and way for disable shading not found

There is no shading :slight_smile: you turned of the shading with disableLighting = true

This is weird reflection due to weird normals