Vertex Colours - Choose Colour Space on Export
Blender exports vertex colours (now colour attributes as of 3.2) in arbitrary colour spaces. FBX seems to export as sRGB, while GLTF seems to export as Linear, with no option to choose upon export.
This isn't great for those of us working in game engines. Unity (left) is showing the same meshes as Blender (right) using a simple shader that responds to vertex colours. This shader uses the Linear colour space, but since Blender will export an FBX as sRGB the colours appear washed-out. The shader would need to be rewritten to accept sRGB, which is beyond the capability of many artists and completely backwards since many engines have moved to Linear colour space. Unity will not import GLTF either so that can't be used to resolve the issue.
Having an option to choose colour space for vertex colours (Linear or sRGB) in the most common exporters would solve a lot of work later in the pipeline.
EDIT: A friend of mine has since created an FBX exporter that will export vertex colours in Linear. Hopefully this helps anyone with the same issue: github.com/wkritzinger/blender-fbx-export-linear-srgb
3 Comments
From conversations with IO developers at Blender this seems like an issue that goes beyond Blender to solve. FBX is closed source and Blender can't do much there in providing options or change the format. GLTF requires the color space to be linear so we can't do anything there either. This would then be up to Unity to interpret or convert the color space from the file formats.
The best Blender can do here is to be up-front on what to expect from the export file formats.
I did read that GLTF required Linear, but didn't know that FBX's closed-source nature restricted changes. That's unfortunate. Maybe other export formats where colour space isn't specified or locked-down could benefit from this option? I'm not sure if OBJ, Collada etc. have their colour space specified. Maybe we're completely out of options there though.
Just coming back to this to say a friend of mine has modified the FBX exporter to export Linear vertex colours, available here: github.com/wkritzinger/blender-fbx-export-linear-srgb
I'm not sure the argument that FBX is closed source is relevant in the face of that...in what way is Blender blocked from adding a simple tickbox for sRGB/Linear? I may be misunderstanding. Anyway, at least this addon may be a solution for those with the same issue.