Estoy tratando de importar un objeto 3D de Cinema4D a Three.js usando GLTFLoader. Sin embargo, este objeto es completamente negro con AmbientLight. Ahora he descubierto que se debe al material utilizado. Si ahora anido el GLTFLoader en un RGBELoader, mi objeto 3D obtiene una iluminación más correcta (vea las capturas de pantalla).
Archivos adjuntos:
new RGBELoader() .load( 'royal_esplanade_1k.hdr', function ( texture ) { texture.mapping = THREE.EquirectangularReflectionMapping; scene.background = texture; scene.environment = texture; render(); // model const loader = new GLTFLoader(); loader.load( 'Cube2.glb', function ( gltf ) { scene.add( gltf.scene ); render(); } ); } ); const light = new THREE.AmbientLight( 0xffffff, 1 ); // soft white light scene.add( light ); scene.background = new THREE.Color( 0x808080 ); const loader = new GLTFLoader(); loader.load( 'Cube2.glb', function ( gltf ) { scene.add( gltf.scene ); render(); } );