I am trying to disble lighting on my external (.glb) textured mesh. I search through topics and found a solution here How disable shading on the mesh? but it does not seem to work.
I am using the disableLighting
property, which works on standard mesh objects, but for external mesh, this property seems unavailable. How to access this property?
How can I disable lighting and reflection?
That’s because meshes[0] is rather a mesh than a transformNode, it has no geometry.
If you comment line 14, the meshes will be white because of lighting, so the disableLighing do work.
2 Likes
Thanks @tanpopo for this quick help and explaining the root cause I highly appreciate it.
I applied your suggestion to the model but seems the model turned black.

This was the original model:-

How can I preserve the texture on the mesh?
Sorry I didn’t read the quesion clearly, in my PG before the meshes are not black because of the environment texture for reflection.
So I think you should use unlit instead, but I’m not able to describe the difference between unlit and disableLighting.
1 Like
disableLighting
is only for the standard material, it does not exist for the PBR material. Use unlit
instead.
2 Likes
Thank you @tanpopo for this quick help.
Thanks, @Evgeni_Popov, for confirming the solution.