FBX loader color doesnt match blender

The FBX loader is showing a darker color than in blender. In FBX loader the hex is 808080 vs BCBCBC in blender. OBJ and GLTF loader do not exhibit the same inconsistencies. Model attached below.

Duffle_bag.fbx (291.9 KB)

The FBX file defines the diffuse color as [ 0.5, 0.5, 0.5 ] which is converted to the hexadecimal notation #808080. So the loader reads the correct value from the asset.

It seems the color is converted to a different value during the export.

Also note that (1) the “Material Preview” view in Blender is not always a good estimation of what the scene will look like under lighting, try the “Rendered” view as well. And (2) the majority of Blender’s material settings do not export to any format. For glTF export you can use the material settings from the documentation here, and the FBX exporter supports a more limited subset.

1 Like

When I export the same model from blender as a glb file it reads correctly as BCBCBC. Is it possible that the fbx loader is lacking some gamma correction or output encoding? No textures are being added in blender - this is just base color.

There are a number of possibilities here:

  1. Blender’s FBX exporter doesn’t support the material, or does not color manage correctly
  2. FBX (the format) does not specify clearly what color space authors or loaders should use
  3. THREE.FBXLoader doesn’t support the material, or does not color manage correctly

It could easily be any of these, and (2) is certainly true in any case. I would recommend using glTF when possible, rather than FBX.

Thanks, I’ll look into if 3 is the cause

Related code here:

I believe that is correct, but it does require/assume that the FBX exporter writes the color in the sRGB color space.