FBXLoader: Loaded models with attached textures have become darker

Hi guys. I have some issue after updating three.js to 107r or higher. Issue with parse fbx format models via FBXLoader.
The models become darker if they have some textures. If this model was converted to json and after that parse it again via ObjectLoader… everything is fine. So this issue is only with parse .fbx (also I checked on OBJLoader and there is everything fine). Can some one help me how to fix this issue?

Actual:
image%20(4)
Expected:
image%20(5)

search before ask, hope this will help.

1 Like

As mentioned in the migration guide for release 107 (https://github.com/mrdoob/three.js/wiki/Migration-Guide#r106--r107), FBXLoader now correctly sets the texture encoding. That means you have to set renderer.gammaOutput to true.

1 Like

@Mugen87 Yeah, didn’t saw this, thanks:)
But anyway after setting renderer.gammaOutput : true everything in the scene become brighter.
Is it possible somehow used only for the fbx model?

(parsed from json via ObjectLoader)
image

@qifei Saw it, but didn’t work in my case :frowning:

The thing is that with this setting your color space management is finally correct. So instead of undoing the change, it’s better to adjust the rest of your scene. E.g. do this for all of your diffuse, emissive and specular maps:

texture.encoding = THREE.sRGBEncoding;
2 Likes

Also do this for your colours:

const mat = new MeshStandardMaterial( {
 color: 0x808080,
 ...
} );
mat.color.convertSRGBToLinear();
2 Likes

@Mugen87 @looeee I got it. Thanks a lot! :slight_smile: It’s works now correctly.

@looeee earlier I tried to check the fbx models on your site https://discoverthreejs.com/apps/loader/ and it looks like your page is a little bit broken :slight_smile:

1 Like

Yeah I know :frowning: I just haven’t had time to fix it.

In the meantime, you can also drag/drop your models into the three.js editor.

https://threejs.org/editor/

However, a model viewer with automatic camera configuration and lighting setup is actually more neat for asset validation :slight_smile: