Does anyone know why i might be seeing this? It’s pretty basic principled material.
I don’t know what part of my project would be hepful for me to paste here code wise as it does work in browser so i’m not sure what it could be. But i’m active - so if you’d like me to post code i can do.
However, it’s unlikely this will be fixed soon since the issue is quite complicated and hard to test. As a workaround, it’s best to use other materials on affected mobile devices like MeshPhongMaterial.
Ok thanks @Mugen87 I have succesfully turned my objects material into a MeshPhongMaterial.
My current workflow was simply: Blender (where I have been texturing and applying materials and maps -> GLTF export / import.
What I can’t work out now is:
Am i better off targeting a specific face of a specific mesh in my scene to change it to a meshphong material or to just simply bring in a second object and parent it… that way i can just use
gltf.scene.traverse( function ( child ) {
if ( child.isMesh ) {
child.material = new THREE.MeshPhongMaterial({
color: 0xFF0000,
flatShading: true,
});
for the ‘floor’ object.
My other confusion is how my roughness map outcome is possible with MeshPhongMaterial - would I use envMap and specularMap to control ‘where’ the shininess was happening?
I’m not sure I understand what you mean but traversing through the model and replacing the material as demonstrated in your code snippet should be the preferred approach.
Well, you can’t assign a roughness map directly to specular map since both properties (specular and roughness) represent two different things. That makes it of course harder to switch the materials since you need to author a specular map in a different way.
Ok, that’s fine - so I can get the same effect as using a roughness map in a standard material, by creating and linking a specular map to a phong material. I’ll have a look thanks.