I'm trying to create a workflow for generating images that I can use in computer vision research. I think that exporting Blender scenes in with a sRGB sequencer in EXR format is exporting images in a scene-linear way, and I can retrieve the CIE XYZ coordinates of each pixel outside Blender.

But I would like to check how Blender uses the colors of materials (e.g. material base and subsurface colors) and lights. When these are defined in 'RGB', can I use a similar conversion matrix to the one from here (Convert an EXR render from scene-linear colorspace to CIE XYZ) to get the CIE XYZ coordinates of the materials and lights in the scene (and so use the inverse matrix to find RGB values for my target CIE XYZ values)?

  • 2
    $\begingroup$ XYZ to RGB is a simple matrix, and the inverse is the inverse direction. Machine vision may not find radiometric-like linear ratios useful however. $\endgroup$ – troy_s Jul 28 '20 at 8:02
  • $\begingroup$ Thanks for you reply, and for confirming that the XYZ to RGB matrix is appropriate here. I'm trying to create a biologically motivated model, based on human vision. I want physically realistic scenes, using some surface colors and lights for which I have a spectral reflectance functions and spectral power distributions. I'm converting these into coordinates based on human cone sensitivities (LMS). If there are only linear transformations within blender then I think it's ok to convert to RGB, render in blender, then take the output. So just to confirm, will there be only linear transformations? $\endgroup$ – ajm Jul 29 '20 at 0:10
  • $\begingroup$ Depends on where you are pulling the data from. In terms of working space, it will be radiometric-ish like, in the RGB primaries as transformed via OpenColorIO. The issue is that for something “based on human vision”, the RGB model could fail you. Also be careful about chromatic adaptation when going to and from. $\endgroup$ – troy_s Jul 29 '20 at 15:22
  • $\begingroup$ I'm not sure you what you mean by 'the RGB model could fail you', I'm planning to convert the RGB output (from the EXR images) back to LMS, does that deal with that concern? Or do you mean that since the rendering will be done in RGB it won't be physically realistic (the 'radiometric-ish'). Is there a better alternative in Blender? $\endgroup$ – ajm Jul 29 '20 at 21:47
  • $\begingroup$ Exactly your last point. The CIE standard observer model is based around a map of stimulus; it doesn’t model sensation. That map is a model that wraps spectral stimulus up into the XYZ model. Anything based on XYZ, such as RGB encodings, are therefore a strange hybrid model that doesn’t quite work for simulating radiometric light transport. As such, the output from such a model may not be entirely suitable. It will depend what exactly you are trying to do. Also, going from RGB to LMS is somewhat impossible, given it’s a one to many mapping of spectra. $\endgroup$ – troy_s Jul 29 '20 at 23:41

Your Answer

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

Browse other questions tagged or ask your own question.