0

I have a simple scene including a sphere model with a moon diffuse and bump texture baked into a ".GLTF File." I imported the model with GLTFJSX, but only the model appears. I turned the lighting up, but that didn't seem to solve the issue. I put this same exact model in another scene and the textures loaded fine.

Problem Sandbox: https://codesandbox.io/s/patient-framework-3holn?file=/src/App.js

1 Answers1

1

The material in your glTF model is 100% metallic – look for the "metallicFactor": 1.0 line in the glTF file. Metallic materials require environmental lighting (IBL) to show reflections, and without this they'll be dark. Moreover, you probably don't want a model of the moon to appear metallic. :)

Either you can fix this by reducing the metallic factor in the model itself, or you can override it when loading the model, with:

materials.Moon.metalness = 0.0;
Don McCurdy
  • 10,975
  • 2
  • 37
  • 75
  • Thank you! I would have never noticed that. I changed the .gltf file so that the metalicFactor is 0.0 and also added a normal map and it completely fixed it! Interesting how the exportation process from C4D's new gltf converter automatically sets the metallicFactor so high. Regardless, much appreciated. –  Nov 18 '20 at 19:29