Maniphest T93176

Exported GLB file has incorrect albedo colors (linear/gamma issue)
Closed, Archived

Assigned To
None
Authored By
Felix Herbst (herbst)
Nov 18 2021, 1:28 AM
Tags
  • BF Blender
Subscribers
Felix Herbst (herbst)
Julien DUROURE (julien)
Scurest (scurest)

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.47

Blender Version
Broken: version: 2.93.6, branch: master, commit date: 2021-11-16 14:54, hash: rBc842a90e2fa1
Worked: (newest version of Blender that worked as expected)

Short description of error
Exporting the attached blend file to GLB results in an incorrect albedo color (too dark) in the resulting file.
The result file can be viewed in e.g. Unity, Windows 3D VIewer, Babylon etc.

Exact steps for others to reproduce the error
Download


Note light green color
Export to GLB
View the GLB file
Note color is too dark
Create a new scene in blender
Import the file
Note color is too bright


Original File


Re-Imported after GLB Export


GLB Export viewed in Windows 3D Viewer

See also https://developer.blender.org/T93174, same issue with FBX, Blender issue instead of export plugin issue?

Event Timeline

Felix Herbst (herbst) created this task.Nov 18 2021, 1:28 AM
Felix Herbst (herbst) updated the task description.
Scurest (scurest) added a subscriber: Scurest (scurest).Nov 18 2021, 2:04 AM

This actually isn't a linear/gamma issue. All colors in glTF are stored in linear space and the glTF addon (hopefully) handles that.

The reason is the vertex colors. In glTF, the first vertex color layer is always multiplied into the base color. There is no way to inhibit this at the material level, the only way the exporter could stop it is by not exporting the vertex colors at all.

So after exporting to glTF, the glTF material is going to be affected by the vertex colors.

If you export with the Geometry > Vertex Colors option off, the exported .glb will match the original model.

Julien DUROURE (julien) added a subscriber: Julien DUROURE (julien).Dec 12 2021, 8:45 AM
Julien DUROURE (julien) closed this task as Archived.Dec 12 2021, 8:50 AM

Seems there is no issue, closing.
Don't hesitate to answer if needed