5
$\begingroup$

It looks like the vertex colors in Blender are stored using sRGB colorspace. The game engine I'm using (Apple SceneKit) uses linear colorspace. As I export the vertex painted model either using the FBX or Collada exporter, the colors seem to be exported in sRGB colorspace and due to this appear "washed out" in the engine. If I convert the color to linear colorspace using x^2.23 the color appears to be correct. Now my question is that is there any way I could get this conversion done in Blender? I wouldn't want to do the color conversion in the game engine.

$\endgroup$
4
$\begingroup$

Answering my own question here. Looks like if I use Collada exporter the colors are correct. So they must use linear color space. Maybe it is more of a responsibility of the export plugin to set the color space used than Blender.

$\endgroup$
2
$\begingroup$

If you run into this problem again, I suggest using the glTF exporter in Blender. The spec requires it to export the vertex colors in linear space. There was a time when this was not working properly, but I have verified that Blender 2.8 Beta appears to be doing the right thing.

If you look at the image below, these pumpkins are both the same model, vertex painted in Blender, and rendered in Unity3D in linear color space. The white one, which looks like a giant garlic bulb, was exported as an FBX. The orange one, which looks much more like a pumpkin, was exported as a glTF.

enter image description here

$\endgroup$
  • $\begingroup$ Perfect timing. Thank you. $\endgroup$ – Pierre Schiller Jun 5 at 21:16
  • $\begingroup$ Thanks. Yea, using glTF would make sense just for this purpose. Nice that formats such as glTF exist that are open and standardised. $\endgroup$ – Teemu Harju Jun 11 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.