0

I have a simple Cube with a PBR Material. Used maps are color, metalness, roughness, bump. When I export the scene via this code, the exported glb is missing all maps but the color. Is this a bug in ThreeJS?

e = new THREE.GLTFExporter();

e.parse(STAGE.scene.mesh, (glb) => {
   let blob = new Blob([glb], { type: "application/octet-stream" });
   let d = document.createElement('a');
       d.href = window.URL.createObjectURL(blob);
       d.download = "orbis.glb"
       document.body.appendChild(d);
       d.click();
       document.body.removeChild(d);
}, {binary: true});
Edric
  • 24,639
  • 13
  • 81
  • 91
nurbs999
  • 87
  • 10

1 Answers1

2

You should use different textures. The reason for this is the gltf specification:

  • You are absolutly right. What I was doing is, using different maps for roughness and metalness. The correct way is to use the same image for both maps (actually for all three maps: roughness, metalness and AO) – nurbs999 Jul 17 '19 at 10:57