Hi guys,
I’m importing a model with the GLTFLoader
. The object is super shiny/glossy and I can’t find how to fix it.
Here it is: https://gd-viewer.firebaseapp.com/
I was able to change easily the shininess on SketchFab using the specular slider, as you can see on this video. However, I can’t reproduce this in my code as it seems that MeshStandardMaterial
has no specular property. Any idea how I can fix this?
The full code is available here : gd-viewer/index.js at fd38bb3369605b893191f6d323cdd04513c45bba · theoavoyne/gd-viewer · GitHub
Thanks a lot!
Perhaps convert the material to MeshPhysicalMaterial after loading, then change .reflectivity
? MeshStandardMaterial does not have this property, but increasing .roughness
does decrease glossiness as well.
Thanks for your reply @donmccurdy. I tried increasing the roughness but it seems to have no effect. How can I convert the material to MeshPhysicalMaterial
?
EDIT
I managed to switch to a MeshPhysicalMaterial
. I set the reflectivity to 0, and still… no effect at all.
Unless I’m doing something wrong. Here is my code:
const object = gltf.scene.children[0].children[0].children[0].children[0];
const physicalMaterial = new MeshPhysicalMaterial(object.material);
physicalMaterial.reflectivity = 0;
physicalMaterial.metalness = 0;
physicalMaterial.needsUpdate = true;
object.material = physicalMaterial;
Omg theoavoyne, I was reading about MeshPhysicalMaterial, I just clicked on your firebase link and realized we work for the same company haha. My mind went
I had trouble with this model too, the maps are not physically accurate.