Hi everyone,
I’m having a texture issue with a glTF model exported from Blender that I can’t seem to solve. When I export my character as a .glb
file and re-import it into a blank Blender project, it looks perfect—all textures and materials are correct.
However, when I load the exact same .glb
file in my Three.js scene, most of the model renders with a shiny, silver/metallic material instead of its actual textures.
This suggests my Blender export settings are correct? and the issue is somewhere in my Three.js setup? no clue
My Workflow:
- Downloaded a character model from Mixamo (FBX format).
- Imported the FBX into Blender 3.6.
- Made some adjustments and exported as a glTF Binary (
.glb
). - Loading the
.glb
into my Three.js application.
The Issue: Here is a side-by-side comparison. The left is how it looks in Blender (correct), and the right is how it renders in my Three.js app (incorrect textures).
As you can see, only the face and headphones seem to have some color, while the rest of the body is metallic.
My Code:
Here is the relevant JavaScript code I’m using to set up the renderer and load the model.
Renderer Setup (initRenderer
):
function initRenderer() {
scene = new THREE.Scene();
renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(window.devicePixelRatio);
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.0;
container.appendChild(renderer.domElement);
}
Model Loading (loadAvatar
):
function loadAvatar() {
const gltfLoader = new GLTFLoader();
gltfLoader.load("/models/Human.glb", (glb) => {
const model = glb.scene;
model.scale.set(100, 100, 100);
model.position.set(0, -150, 0);
scene.add(model);
console.log("Model loaded:", model);
});
}
What I’ve Tried:
- Confirmed the
.glb
file is valid by re-importing it into Blender. - Ensured my materials in Blender use the
Principled BSDF
shader. - Set
renderer.outputColorSpace
andrenderer.toneMapping
as recommended for PBR workflows.
I feel like I’m missing something obvious in the Three.js scene setup. Does anyone have any ideas what could be causing the PBR materials to render incorrectly?
Thanks in advance for any help!