Model is black due no neutral environment

I have this model where there is lightning inside the glb file, if you load the file here, it shows perfect. After some investigation it seems that the environment should be neutral but i dont know what that means? Can someone helps me out?

Your model shows up black because it’s (a) using a PBR material - ie. MeshStandardMaterial / MeshPhysicalMaterial, and (b) has surface with roughness different than 1.0.

In order to use PBR effectively (or at all), you need to have scene.environment set to any texture, as PBR calculations depend on the environment being reflected / diffused by the material. If there’s no environment texture, then that texture will just be read as a black color in the shaders, rendering reflections (and the material) black.

Either set scene.environment to any texture, or change the material type to a non-PBR one, ex.:

gltf.scene.traverse(child => {
  if (child.material) {
    child.material = new THREE.MeshPhongMaterial({ color: 0x888888 + Math.random() * 0x888888 });
1 Like

In my viewer, “neutral” refers to a dynamically-generated environment map created with THREE.RoomEnvironment:

But any environment map from a .hdr or .exr texture would also be fine.


That explains a lot! Thanks for answering :slight_smile: